In this recipe, we will have a closer look at the challenges that change the workflow elements in a schema pose. Changing the in- and out-parameters, as well as moving or renaming actions will be discussed. You will learn how to make these changes as well as what to avoid.
We need a workflow that has an additional workflow as well as an action in its schema.
You can use the 04.01.02 MainWorkFlow
and 04.01.01 SubWorkflow
example workflows as well as the reNameMe
action, which is part of the example package.
There are only two major tasks: changing the parameters and renaming/moving the actions.
If you change a subworkflow's in/out-parameters, you will need to synchronize its parameters by following these steps:
04.01.02 MainWorkFlow
and 04.01.01 SubWorkflow
example workflows.
The same method also works for actions. Try the following:
Actions are tied into a workflow using their module name and the action name. So, if an action is moved to a different module or renamed, you will have to do the following:
04.01.02 MainWorkFlow
example workflow and the reNameMe
action.
Therefore it's important to know which element is used where. See the next section on how to do that.
We will now see how we can find out what action is used by what other elements:
com.packtpub.Orchestartor-cookbook2ndEdition.helpers
module.
This also works for Resource and Configuration elements.
Workflows are tied in with each other via their ID (which can't be changed and is unique) and not their name. So, renaming or moving a workflow has no impact.
If you add or remove an in/out-parameter from a workflow or action, you can simply synchronize the parameter. When you change the name of an in/out-parameter in a workflow or action and then synchronize, you will have to redefine the binding of that parameter.
An action is always called in the following way:
System.getModule([module name]).[action name]([in-parameter],)
When you move or rename an action, you will need to adjust this call by either changing the module name
(move) or the action name
(rename).
If you rename a configuration element or parameter, you will have to bind it again in the workflow. The setting will point to the old configuration element that doesn't exist anymore.