You can easily and simultaneously create multiple large and hierarchical process objects by importing one or more JSON files and JSON payloads.
Use the New Process Objects Creation from JSON Files wizard to create process objects from JSON files. After you specify the source, Application Integration parses the source, loads the resources, and generates XSD schemas. Based on the XSD schemas, Application Integration generates the process objects. You can specify import preferences such as the location for saving the process objects and optionally specify the tags to be used for the process objects.
In case errors occur during the process object creation, the wizard displays the errors under the Related Logs tab of the corresponding step. You can review the log and take corrective actions. You can also download the log. When you download the log at a particular step, the log also shows cumulative logging information for all the previous steps.
1In Application Integration, click New.
The New Asset dialog box appears.
The following image shows the New Asset dialog box:
2Click Process Object on the left pane.
3On the right pane, expand the Process Object Creation Patterns list, click Create from JSON, and then click Create.
The New Process Objects Creation from JSON Files dialog box appears.
The following image shows the New Process Objects Creation from JSON Files dialog box:
4In the Source field, select one of the following values:
Option
Description
File
Select File to specify a single JSON source file with payload from your local system. You can also specify HTTP resources. Click Choose File to select the JSON source file.
The maximum allowed file size for a single file is 5 MB.
Default is File.
Zip (multiple files)
Select Zip to specify multiple JSON files that contain samples of payloads to be received or returned by the process in the form of a zip file from your local system. Click Choose File to select the zip file.
The maximum allowed file size for a zip file is 3 MB.
URL
Select URL to specify a URL that contains an JSON source file with payload. The URL and Use Authentication fields appear.
In the URL field, enter the source URL.
Select the Use Authentication option to specify the user name and password to access the source URL.
Direct
Select Direct to create a process object by directly pasting a JSON payload. After you select the option, provide a unique process object name in the Process Object Name field and paste the JSON payload in the text box.
The maximum allowed size for the JSON payload is 5 MB.
Note: The Process Object Name field and the text box can't be empty. The name that you provide in the Process Object Name field must start with a letter and can contain only letters, numbers, underscores (_), and hyphens (-).
5Click Next.
Application Integration parses the specified source and displays the resource details on the Load Resources tab. If you import a zip file, the Load Resources tab contains a list of JSON resources.
The following image shows the Load Resources tab with the resource details:
6Review the resource details.
The following table describes the columns that the Load Resources tab displays:
Column Name
Description
File Name
The file name of the resource.
File Path
The URL or relative location of each resource within the source.
Type
The file type of the resource. Displays the value as JSON.
Status
The status of the resource. Displays one of the following values:
- Valid. Indicates that the file type is supported and that the file content is valid.
- Invalid. Indicates that either the file type is not supported or the file content is not valid.
Comments
Indicates whether the file type is supported or not.
If there are parsing errors, Application Integration displays the error details on the Related Logs tab. Fix the errors and try again.
7Click Next.
Application Integration converts the resources into XSD schemas based on which the process objects will be created. It displays the schema details on the Generate Schemas tab.
The following image shows the Generate Schemas tab with the schema details:
8Review the schema details.
The following table describes the columns that the Generate Schemas tab displays:
Column Name
Description
Schemas
The name of the generated XSD schema file.
Source
The source from which the XSD schema file was generated.
Complex Types
The number of complex types that will be created for each XSD schema.
Prefixes
The prefix to be used for the XSD schema.
You can use a prefix to easily identify process objects that are created from a schema. For example, you might want to add the prefix Salesforce for all process objects that are created from a Salesforce schema.
To specify a prefix for a schema, double-click under the Prefixes column against the row that contains the schema, and enter a prefix. All the process objects that are created from the schema will use the same prefix that you specify in this field.
Tags
The tags to be used for the XSD schema.
You can use a tag to group related schemas together. For example, you might want to group all schemas containing financial resources under the tag Finance.
To specify a tag for a schema, double-click under the Tags column against the row that contains the schema, and enter a tag. All the process objects that are created from the schema will use the same prefix that you specify in this field.
If there are schema generation errors, Application Integration displays the error details on the Related Logs tab. Fix the errors and try again.
9Click Next.
Application Integration applies the prefix and tags that you specified for the XSD schemas, and generates the process objects based on the XSD schemas. It displays the process object details on the Generate Objects tab. The process object names are suffixed with the term Type.
The following image shows the Generate Objects tab with the process object details:
10Review the process object details.
The following table describes the columns that the Generate Objects tab displays:
Column Name
Description
Name
The name of the process object that was generated from the schema.
Description
The schema from which the process object was generated. You can edit the description.
No. of Fields
The number of complex types that the process object contains.
Tags
The tags to be used for the process object. By default, the process object tags are derived from the tags that you specified for the XSD schema.
You can edit the tags if you want to specify different tags at the process object level.
To edit the tags for a process object, double-click under the Tags column against the row that contains the process object, and update the tags.
11Click Next.
The Import Preferences tab appears displaying the number of process objects that will be created.
The following image shows the Import Preferences tab:
12Optionally, click Browse to specify a location where you want to save the process objects.
Default is the location that was selected when you opened the New Process Objects Creation from JSON Files wizard.
13Optionally, specify additional tags for the process objects as comma-separated values.
14Click Start Import.
Application Integration starts importing the process objects and displays the import status.
The following image shows the import status:
15Perform one of the following actions:
- To dismiss the dialog box and get notified when the process objects import is complete, click Dismiss.
- To view and fix import errors, and retry the import, stay on the dialog box.
After importing the process objects, Application Integration displays a status message indicating if the import was successful or failed.
If the import failed, check the Related Logs tab, fix the errors, and try importing the process objects again. You can also click the Download icon to download the entire log.
The following image shows a sample log stating that 8 process objects have been imported successfully:
16Click Done.
17Navigate to the location that you specified for the process objects creation and review the process objects.
Rules and guidelines for JSON files
Consider the following rules and guidelines when you import a JSON file to create a process object:
•When you import a JSON file, if there is only one item available in the process object list that you import, the field type is set to Reference by default in the Process Object editor.
•When you import a JSON file, if a process object doesn't contain any item, no field is created.
•When you import a JSON file to create a process object, in addition to the objects defined within the JSON file, a root process object with the file name is also created.
Consider that you have a JSON file named sampleJson.json, which contains the JSON payload as shown in the following sample:
After you import the sampleJson.json file, three process objects named ContactType, TestType, and SampleJsonType are created.
The following image shows the process objects that are created after importing the JSON file:
• If the JSON file name contains only numeric characters, RootPO is prefixed to the process object name.
For example, if the file name is 1234.json, the process object name would be RootPO1234.
• If there are multiple process objects with the same name in a single file, only one process object is created and reused. All the fields are merged into the same process object.
For example, in the above sampleJson.json file, there are two objects with the name contact. When you import the JSON file, the telephone and mobile fields are merged into the ContactType process object.
• If the process objects with the same name already exist in the selected folder, the following message appears in the log:
[WARNING]: Process object <Process_Object_Name> imported with warning. Resolution: CONFLICT, Status: SUCCESSFUL, Status Code: MigrationSvc_055, StatusMesssage: Reuse existing object