Class CopyChangesToMainDataspace
java.lang.Object
com.orchestranetworks.workflow.ScriptTaskBean
com.apgar.common.lib.workflow.scripttask.CopyChangesToMainDataspace
public class CopyChangesToMainDataspace
extends com.orchestranetworks.workflow.ScriptTaskBean
Copies changes made to a specific table in a child dataspace to the main dataspace without closing the child dataspace. This method can
be used as an alternative to the merge dataspace step in a workflow.
Limitations: This class currently does not handle associations.
The following input parameters should be configured in the workflow model step:
- Parameter name:
workspace(e.g., ${workSpace}) - Parameter name:
dataspace(e.g., ${dataSpace}) - Parameter name:
dataset(e.g., ${dataSet}) - Parameter name:
table(e.g., /root/TableName)
To be utilized, the bean must be defined in the module.xml file like
<beans>
<bean className="com.apgar.common.lib.workflow.scripttask.CopyChangesToMainDataspace">
<documentation xml:lang="en-US">
<label>Copy Records To Core Script Task</label>
<description></description>
</documentation>
<properties>
<property name="workspace" input="true">
<documentation xml:lang="en-US">
<label>Workspace</label>
</documentation>
</property>
<property name="dataspace" input="true">
<documentation xml:lang="en-US">
<label>Dataspace</label>
</documentation>
</property>
<property name="dataset" input="true">
<documentation xml:lang="en-US">
<label>Dataset</label>
</documentation>
</property>
<property name="table" input="true">
<documentation xml:lang="en-US">
<label>Table</label>
</documentation>
</property>
</properties>
</bean>
</beans>
- Author:
- APGAR Consulting
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteScript(com.orchestranetworks.workflow.ScriptTaskBeanContext context) Copies changes made in the workflow working workspace to the main dataspace for a specific table in the designated dataset, including additions, modifications, and deletions.Returns the unique name of the dataset.Returns the dataspace name.getTable()Returns the table path.Returns the child dataspace name (workflow working workspace).voidsetDataset(String dataset) Sets the dataset ID.voidsetDataspace(String dataspace) Sets the dataspace ID.voidSets the table path.voidsetWorkspace(String workspace) Sets the workflow working workspace.
-
Constructor Details
-
CopyChangesToMainDataspace
public CopyChangesToMainDataspace()
-
-
Method Details
-
executeScript
public void executeScript(com.orchestranetworks.workflow.ScriptTaskBeanContext context) throws com.orchestranetworks.service.OperationException Copies changes made in the workflow working workspace to the main dataspace for a specific table in the designated dataset, including additions, modifications, and deletions. The workspace will remain open after the merge.- Specified by:
executeScriptin classcom.orchestranetworks.workflow.ScriptTaskBean- Parameters:
context- the context of the script task bean- Throws:
com.orchestranetworks.service.OperationException- if any procedure related to creation, modification, or deletion fails
-
getWorkspace
Returns the child dataspace name (workflow working workspace).- Returns:
- the dataspace ID
-
setWorkspace
Sets the workflow working workspace.- Parameters:
workspace- the working workspace ID
-
getDataspace
Returns the dataspace name.- Returns:
- the dataspace ID
-
setDataspace
Sets the dataspace ID.- Parameters:
dataspace- the dataspace ID
-
getDataset
Returns the unique name of the dataset.- Returns:
- the dataset ID
-
setDataset
Sets the dataset ID.- Parameters:
dataset- the dataset ID
-
getTable
Returns the table path.- Returns:
- the string representation of the table path
-
setTable
Sets the table path.- Parameters:
table- the table path
-