Class SetApprovalInformationScriptTask
java.lang.Object
com.orchestranetworks.workflow.ScriptTaskBean
com.apgar.common.lib.workflow.scripttask.SetApprovalInformationScriptTask
public class SetApprovalInformationScriptTask
extends com.orchestranetworks.workflow.ScriptTaskBean
Updates the approval information for records in a specified dataset within a workflow context.
The task identifies records that have been created or modified, and sets the approval date and the user who approved the records.
The following input parameters should be configured in the workflow model step:
- Mandatory Parameters:
- Parameter name:
workSpace(e.g., ${workSpace}) - Parameter name:
dataSet(e.g., ${dataSet}) - Parameter name:
lastUser(e.g., ${user}) - represents the user who approved the records.
- Parameter name:
- Optional Parameters:
- Parameter name:
approvedDate(e.g., ./approvedDate). If not specified, the default path will be./tracking/approvedDate. - Parameter name:
approvedBy(e.g., ./approvedBy). If not specified, the default path will be./tracking/approvedBy.
- Parameter name:
To be utilized, the bean must be defined in the module.xml file like
<beans>
<bean className="com.apgar.common.lib.workflow.scripttask.SetApprovalInformationScriptTask">
<documentation xml:lang="en-US">
<label>Update Approval Information for Records</label>
<description></description>
</documentation>
<properties>
<property name="workSpace" input="true">
<documentation xml:lang="en-US">
<label>Workspace</label>
</documentation>
</property>
<property name="dataSet" input="true">
<documentation xml:lang="en-US">
<label>Dataset</label>
</documentation>
</property>
<property name="lastUser" input="true">
<documentation xml:lang="en-US">
<label>Last User</label>
</documentation>
</property>
<property name="approvedDate" input="true">
<documentation xml:lang="en-US">
<label>Approved Date Field Path</label>
</documentation>
</property>
<property name="approvedBy" input="true">
<documentation xml:lang="en-US">
<label>Approved By Field Path</label>
</documentation>
</property>
</properties>
</bean>
</beans>
- Author:
- APGAR Consulting
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteScript(com.orchestranetworks.workflow.ScriptTaskBeanContext context) Executes the script task to update the approval information for records.
-
Constructor Details
-
SetApprovalInformationScriptTask
public SetApprovalInformationScriptTask()
-
-
Method Details
-
executeScript
public void executeScript(com.orchestranetworks.workflow.ScriptTaskBeanContext context) throws com.orchestranetworks.service.OperationException Executes the script task to update the approval information for records.It scans the tables within the dataset
dataSetand the dataspaceworkSpacefor any records that have been created or modified during the workflow. If such records are found, it updates the "Approval Date" and "Approved By" fields accordingly.If the
lastUsercontext variable is not specified, the task will not do anything.- Specified by:
executeScriptin classcom.orchestranetworks.workflow.ScriptTaskBean- Parameters:
context- the context of the script task bean- Throws:
com.orchestranetworks.service.OperationException- if there is an error updating the records with the approval information
-