Customizing Workflows With Parameters
Last updated
Last updated
© Copyright 2023, Astera Software
The workflows you create with Astera can be ported to any number of target environments that may use different connections to data providers, or other settings specific to the target environment. For example, you can create and test your workflow in a staging environment, and then deploy it in your production environment.
Prior to deploying to your target environment, you may need to update the workflow’s data connections, making them appropriate for the target environment. The updating of data connections is made easy by using the Parameter Information Replacement dialog.
To open the Parameter Information Replacement, the annotated icon located in the workflow toolbar, is to be selected.
This will open a new window where the parameters for your workflow are going to be defined.
The left-hand pane of the Parameter Information Replacement dialog shows the Parameter tree with the objects that support the use of parameters, present in the workflow.
Select an object in the tree and update its connection in the right-hand pane’s input, as necessary.
In addition to aligning your data connections with a target environment, you might also want to ensure that any context information is suitable for the environment that your workflow will run in. For example, make sure that the server’s name variable points to the correct server instead of being hard-coded.
This can be achieved by using Context Information parameters. Context Information parameters take their values dynamically at workflow run-time. These parameters include ServerName, JobId, UserName, DroppedFilePath, among others.
To use Context Information parameters in your workflow, drag-and-drop the Context Information object from the Resources group in the Toolbox onto the workflow.
Right-click on the object’s header and select Properties from the context menu.
This will open the Context Information Properties window.
The following parameters are available:
Name: Name of the workflow.
JobId: ID of the job assigned by the server.
ScheduledJobId: ID of the job associated with a schedule in case of scheduled running on a server.
ServerName: Name of the server running the workflow.
UserName: User account that runs the workflow.
DroppedFilePath: Path to the file being dropped, in case of a scheduled job of type when file is dropped.
SubmissionID: Provides the ID of the user performing the submission.
You can also define any number of custom parameters. These custom parameters can be used throughout the workflow. They can be initially assigned a default value, and then their value can change while running your workflow.
Custom parameters can be configured in the Variables object.
To add a Variables object in a workflow, drag it from the Resources group in the Toolbox and drop it onto the workflow.
To add a new parameter, right-click on the Variables object and select Properties from the context menu.
A new window will open.
Enter your new parameter in the grid. The parameter should be assigned a Data Type, and it can optionally be assigned a default value.
If the variable has been assigned an input value, it is going to act as an input to another object with a certain value.
If the variable has been assigned an output value, that value can be used anywhere within the dataflow and can be mapped onto other objects as well.
This concludes our discussion on customizing workflows with parameters in Astera.