Operation usage example
This example demonstrates how to use the Coupons function in a workflow definition.
Generally, operations correspond to specific tasks. For
example, a loan approval workflow might include a step for printing
payment coupons. An automated process named LoanPrint could complete
this step; within LoanPrint, a function named Coupons contains the
code to print the coupons. The following are the general tasks necessary
to use the Coupons function in a workflow definition:
- A software developer creates a program (LoanPrint) that contains
a function named Coupons.
- The Coupons function includes input parameters named cust_name and payment_amount and an output parameter named loan_number. (The function accesses an external database of customer records, finds the next unused loan number, and assigns that loan number to the current loan application. This loan number will be passed to the workflow.)
- The application developer configures the LoanPrint program to monitor the LoanApps work queue.
- The system administrator defines a LoanApps work queue with an operation named Coupons. The
Coupons operation requires the following parameters:
Table 1. Table of coupon operations parameters and description Name Type Access (data flow direction) cust_name String Read payment_amount Float Read loan_number String Write In the parameter definitions, Read indicates that a data value that passes from the work item to the operation. Write indicates that a data value is generated by the operation and then passed to the work item.
- In Process Designer, the workflow author creates a workflow map
that includes a step called PrintCoupons. The author defines the PrintCoupons
step to go to the LoanApps work queue; in addition, the author selects
the Coupons operation for the step and defines the operation parameters
as follows:
Table 2. Table of coupon operations parameters and description Name Type Expression cust_name String ApplicantName payment_amount Float MonthlyPayment loan_number String LoanNumber In the parameter definitions, ApplicantName, MonthlyPayment, and LoanNumber are all data fields defined for the workflow. The above example indicates that the Coupons operation will use the value in the ApplicantName data field as input for the cust_name parameter; similarly, MonthlyPayment will be input for payment_amount. In addition, the LoanNumber data field will hold the value output by the loan_number parameter.