- Add a Custom Task to your solution: in the menu, choose
Tasks > Standard > Custom Task. See Adding Components to the Solution.
- In the Properties tab, enter the Logging Name for the task. This name is used in the log and the
Monitor to identify items that belong to this component.
Make this name unique within the solution.
- Connect the task to upstream and downstream components,
according to your processing needs.
-
Run task in a separate process- this option will cause MD Link to isolate the Jython script in a process separate from the rest of the solution and the Studio / Service. This is useful in rare situations such as your Jython code leaks memory or cause frequent crashes due to a faulty database driver.
- Performance grouping- allow this task to be part of a performance group, if the solution-level option of the same name is enabled.
- XML shorthand variables
- To force validation of the output XML document against the
task’s output schema at runtime, in the Properties
tab, Parameters sub-tab, check Validate output document against output
schema. Validation takes place at the end of each execution.
If validation fails, the tasks fails – that is, its failure port fires.
- In the Properties
tab, Parameters sub-tab, build,
import, or import and customize the input and output parameter trees. See Building
or customizing a Custom Task schema.
- In the Data Mapping
tab, map input schema elements to output schema elements as needed.
- (Optional) Use Advanced
Target Mapping. See Customizing
a Target Node with Advanced Target Data Mapping.
- In the Properties
tab, Load/Run/Unload sub-tab, using the
parameters that you have set up in the Parameters
sub-tab, write the Jython code needed to transform the input DOM into the
output DOM, to handle input events, and to generate output events, including
task failure if necessary.
- In the Properties
tab, Test sub-tab, test your script.
This simulates a custom task execution as would happen at run-time, but without
affecting any other MD Link components.
- (Optional) Configure the Alerts tab. See Alerts
tab.