Customizing Workflows With Parameters

Replacing Parameters In Workflows

The workflows you create with Centerprise 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.

1. To open the Parameter Information Replacement, the annotated icon located in the workflow toolbar, is to be selected.

01-Parameter-Replacement-Workflow

This will open a new window where the parameters for your workflow are going to be defined.

03-Parameter-Properties-Window

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.

2. Select an object in the tree and update its connection in the right-hand pane’s input, as necessary.

04-Altering-Parameters-Properties-Workflow

Context Information

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.

1. 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.

05-Context-Info-Object

2. Right-click on the object’s header and select Properties from the context menu.

06-Properties-Click-Context-Info-Workflow

This will open the Context Information Properties window.

07-Properties-Window-ContextInfo-Workflow

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.

Custom Parameters

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.

1. To add a Variables object in a workflow, drag it from the Resources group in the Toolbox and drop it onto the workflow.

08-Variables-Object-Workflow

2. To add a new parameter, right-click on the Variables object and select Properties from the context menu.

09-Properties-Variable-Workflow

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.

10-Parameter-Variable-Properties-Workflow

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 Centerprise.