|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.imixs.workflow.plugins.AbstractPlugin
org.imixs.workflow.jee.plugins.AbstractPlugin
org.imixs.workflow.jee.plugins.VersionPlugin
public class VersionPlugin
This plugin handles the creation and management of versions from an existing workitem. inside the Imix JEE Workflow. The creation or modificatin of a version is defined by the workflowmodel. The plugin can generate new versions (e.g. creating a version of a master version) and also converting a existing version into a master version.
The Plugin depends on the org.imixs.workflow.jee.ejb.WorkflowManager. So the Plugin can not be used in other implementations.
The creation and management of a new version is defined by the workflow model (See Imixs Modeler) There are currently two modes supported (provided by the activity property 'keyVersion')
mode=1 indicates that the plugin should create a new version of the current workitem. The two workitems are identically except the attributes $unqiueid and $workitemidRef. The attribute workitemidRef points to the $uniqueid form the source workitem. So the availability of this property indicates that the workitem is a version of source workitem with this $uniqueid. The source workitem has typically no $workitemidRef attribute. The Source Workitem is also named Master Version. After the new version is created the plugin processes the version with the activity provided by the model (numVersionActivityID) if provided by the model.
2=indicates that the plugin should convert a existing version into a Master Version. This means that the $workitemIDRef will be nulled. An existing Master Version will be processed by the activity provided by the model (numVersionActivityID). Also the $workitemidRef will be set to the current $workitemID.
If an error occured during the workflow process this plugin will throw a new ejbexception in the close() method to cancel the current transaction. So no changes will be saved by the ejb container
org.imixs.workflow.jee.ejb.WorkflowManager| Field Summary |
|---|
| Fields inherited from class org.imixs.workflow.plugins.AbstractPlugin |
|---|
ctx |
| Fields inherited from interface org.imixs.workflow.Plugin |
|---|
PLUGIN_ERROR, PLUGIN_OK, PLUGIN_WARNING |
| Constructor Summary | |
|---|---|
VersionPlugin()
|
|
| Method Summary | |
|---|---|
void |
close(int status)
|
org.imixs.workflow.ItemCollection |
createVersion(org.imixs.workflow.ItemCollection sourceItemCollection)
This method creates a new instance of a exiting workitem. |
org.imixs.workflow.ItemCollection |
getVersion()
|
void |
init(org.imixs.workflow.WorkflowContext actx)
the init method throws an exception if the plugin is not run in a instance of org.imixs.workflow.jee.ejb.WorkflowManager. |
int |
run(org.imixs.workflow.ItemCollection adocumentContext,
org.imixs.workflow.ItemCollection adocumentActivity)
creates an version depending to the version mode and the version activity ID provided by the workflow model. |
void |
setVersion(org.imixs.workflow.ItemCollection version)
|
| Methods inherited from class org.imixs.workflow.jee.plugins.AbstractPlugin |
|---|
getUserName |
| Methods inherited from class org.imixs.workflow.plugins.AbstractPlugin |
|---|
formatItemValues, getAbbreviateName, getCommonName, replaceDynamicValues |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VersionPlugin()
| Method Detail |
|---|
public void init(org.imixs.workflow.WorkflowContext actx)
throws Exception
init in interface org.imixs.workflow.Plugininit in class AbstractPluginExceptionpublic org.imixs.workflow.ItemCollection getVersion()
public void setVersion(org.imixs.workflow.ItemCollection version)
public int run(org.imixs.workflow.ItemCollection adocumentContext,
org.imixs.workflow.ItemCollection adocumentActivity)
throws Exception
run in interface org.imixs.workflow.Pluginrun in class AbstractPluginException
public void close(int status)
throws Exception
close in interface org.imixs.workflow.Pluginclose in class AbstractPluginException
public org.imixs.workflow.ItemCollection createVersion(org.imixs.workflow.ItemCollection sourceItemCollection)
throws Exception
sourceItemCollection - the ItemCollection which should be versioned
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||