Menu

ProcessDefinition Log in to Edit

mrizzo99

jharksWorkflow Process Documentation

Surveys backed by a jharks workflow in Web Applications

Initiating a workflow

To initiate a workflow from a web application you can simply build a html link with the appropriate initiation parameters.
Check out the org.jharks.workflow.survey.engine.gui.taglib.PresentationConstants for corresponding parameter constants.

  • start_workflow: indicates whether a workflow should be started (PresentationConstants.START_WORKFLOW_INDICATOR).
  • state: indicates the workflow state to initialize at start up (PresentationConstants: STATE).
  • workflowDefinitionFile:indicates the workflow definition file by name that defines the workflow to be used for this survey (PresentationConstants.WORKFLOW_DEFINITION_FILE).
  • workflowKeyLabel: indicates the arbitrary workflow key defined by the survey builder that will used for identifying the type of workflow within registries.
  • fileResource: indicates whether the workflowDefinitionFile being used is a file resource. By default this setting for workflow initiation is true

Note: If fileResource is true then you need to specify the workflowDefinitionFile parameter to indicate which physical file should be retrieved to initiate the workflow and the
workflowKeyLabel which will be used as the key to store references within workflow registries for the application instance. If fileResource is false you only need to specify the workflowKeyLabel. The workflowKeyLabel must match the identifier used to store the workflow definition in a stream repository. Currently the jharks workflow-survey-engine
library supports workflow definitions being stored in a Oracle database repository in the XML_WORKFLOW_DEFINITION table. The workflowKeyLabel must match the value defined within the DEFINITION_NAME column of the XML_WORKFLOW_DEFINITION table.


Struts Integration

Jharks is working on providing integrator packages to allow for easy integration into various web frameworks.

Struts 1.2.x integration

The integrator package will provide a class org.chboston.workflow.survey.engine.web.struts.GenericWorkflowAction and an example action SurveyEngineFrontAction. The GenericWorkflowAction extends the Struts library Action class and can be further extended by your custom Struts action that you will like to use as a front controller to jharks workflow backed web surveys.

The SurveyEngineFrontAction shows how to implement an extension of the GenericWorkflowAction and logic that would need to be included.

The key part of the code is to determine whether a continuation of the survey-workflow is occurring or whether it is just being initialized.

Check out the start guide for a Struts Application [StartGuideForStrutsApp]


Related

Wiki: Home
Wiki: StartGuideForStrutsApp

Discussion

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.