-
Notifications
You must be signed in to change notification settings - Fork 5
Workflow Viewer_138773144
nxi edited this page Apr 9, 2015
·
1 revision
Created by Tony Lam, last modified on Feb 07, 2010
Workflow viewer is the visual representation of a workflow. It can display a workflow as a sequence of tasks in a single page, or in multi pages wizard dialog. The viewer can be served as a read-only workflow display, or a dynamic editor for composing tasks for a workflow.
Image:attachments/138773144/139001876.png
The workflow viewer is a normal SWT component which can be attached to any SWT composite object. Before the viewer is activated (by calling afterParametersSet()), users can inject a workflow object as the model of this viewer. Without the object injection, a default empty workflow will be used.
You can use the SWT style bit to configure the appearance of the viewer, for example, the following can be used to hide the tool bar:
After the viewer is activated, further setting of workflow will trigger a refresh of the viewer. This means at runtime you can swap the workflow without recreating a new viewer.
The workflow viewer is designed to extensible, so that it can be used for different context. One example is that we use this workflow viewer as a composer for the visual SICS batch system. The extensibility of the viewer is achieved by the composition pattern. Each viewer is composed by two components (known as the workflow viewer component). On the left hand side there is a tool component, and on the right hand side there is a main component. Each component can be composed by other workflow viewer components.
// Create a new viewer instance IWorkflowViewer viewer = new WorkflowViewer(parent, SWT.NONE); // Inject a workflow (optional) viewer.setWorkflow(workflow); // Activate the viewer viewer.afterParametersSet();
// Do not render tool bar on the left hand side IWorkflowViewer viewer = new WorkflowViewer(parent, IWorkflowViewer.NO_TOOL);
Image:images/icons/bullet_blue.gif (image/png)
Document generated by Confluence on Apr 01, 2015 00:11
Home | Developer Guide | Copyright © 2013 ANSTO