Class WorkflowLauncher
java.lang.Object
com.apgar.common.lib.workflow.launcher.WorkflowLauncher
Utility Class with common methods to launch a workflow.
- Author:
- APGAR Consulting
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidlaunch(Repository repository, Session session, PublishedProcessKey workflowId, Adaptation record, DataContext dataContext, Integer priority) Launches a workflow process created from a record and sets its parameters.static ProcessLauncherResultlaunchWithResult(AdaptationHome currentHome, Repository repository, Session session, PublishedProcessKey workflowId, DataContext dataContext, Integer priority) Creates a workflow and sets its input parameters.static ProcessLauncherResultlaunchWithResult(Session session, PublishedProcessKey workflowId, Adaptation record, DataContext dataContext, Integer priority) Creates a workflow from a record and sets its input parameters.static ProcessLauncherResultlaunchWithResultDescription(AdaptationHome currentHome, Repository repository, Session session, PublishedProcessKey publishedProcessKey, DataContext dataContext, Integer priority) Creates a workflow and sets its input parameters, including a description.static ProcessLauncherResultlaunchWithWorkspaceCreationWithResult(Session session, PublishedProcessKey workflowId, Adaptation record, DataContext dataContext, Integer priority) Creates a workflow from a record and sets its input parameters.
-
Method Details
-
launchWithResult
public static ProcessLauncherResult launchWithResult(AdaptationHome currentHome, Repository repository, Session session, PublishedProcessKey workflowId, DataContext dataContext, Integer priority) throws OperationException Creates a workflow and sets its input parameters.- Parameters:
currentHome- Current dataspacerepository- Repositorysession- SessionworkflowId- Publish key of the WorkflowdataContext- DataContextpriority- Workflow model priority- Returns:
- a workflow instance
- Throws:
OperationException- Exception
-
launchWithResultDescription
public static ProcessLauncherResult launchWithResultDescription(AdaptationHome currentHome, Repository repository, Session session, PublishedProcessKey publishedProcessKey, DataContext dataContext, Integer priority) throws OperationException Creates a workflow and sets its input parameters, including a description.- Parameters:
currentHome- Current dataspacerepository- Repositorysession- SessionpublishedProcessKey- Publish key of the WorkflowdataContext- DataContextpriority- Workflow model priority- Returns:
- a workflow instance with description
- Throws:
OperationException- Exception
-
launchWithResult
public static ProcessLauncherResult launchWithResult(Session session, PublishedProcessKey workflowId, Adaptation record, DataContext dataContext, Integer priority) throws OperationException Creates a workflow from a record and sets its input parameters.- Parameters:
session- SessionworkflowId- Publish key of the Workflowrecord- AdaptationdataContext- DataContextpriority- Workflow model priority- Returns:
- a workflow instance
- Throws:
OperationException- Exception
-
launchWithWorkspaceCreationWithResult
public static ProcessLauncherResult launchWithWorkspaceCreationWithResult(Session session, PublishedProcessKey workflowId, Adaptation record, DataContext dataContext, Integer priority) throws OperationException Creates a workflow from a record and sets its input parameters.- Parameters:
session- SessionworkflowId- Publish key of the Workflowrecord- AdaptationdataContext- DataContextpriority- Workflow model priority- Returns:
- a workflow instance
- Throws:
OperationException- Exception
-
launch
public static void launch(Repository repository, Session session, PublishedProcessKey workflowId, Adaptation record, DataContext dataContext, Integer priority) throws OperationException Launches a workflow process created from a record and sets its parameters.- Parameters:
repository- Repositorysession- SessionworkflowId- PublishedProcessKeyrecord- AdaptationdataContext- DataContextpriority- Workflow model priority- Throws:
OperationException- Exception
-