Project creation
To create a workflow project copy the following directory structure:
src
java
workflow
<workflow distribution name>Workflow.xml
<workflow distribution name>Queries.xml
metadata.properties
<XML files for action form schemas and layout>
project.properties
project.xml
src/workflow/metadata.properties must contain the following:
workflow.version=@workflow.version@
project.properties must contain property workflow.distribution.name. The value must be the name under which the Zip file will be deployed. For example ReviewedActions.
The value of the workflow.distribution.name property is also the prefix for the workflow and queries definition XML files.
Here is a template for the workflow definition file:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE workflow PUBLIC "-//OpenSymphony Group//DTD OSWorkflow 2.7//EN" "http://www.opensymphony.com/osworkflow/workflow_2_7.dtd"> <workflow> </workflow>
Here is a template for the workflow queries file:
<?xml version="1.0" encoding="UTF-8"?> <list xsi:noNamespaceSchemaLocation="http://repository.hippocms.org/schemas/workflow/workflow-queries.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> </list>
The Maven project descriptor can be used just like a descriptor which is used to build a normal JAR file.
Building
To build the workflow Zip file you need the Hippo workflow plugin for Maven. First make sure you add the Hippo public repository, http://repository.hippocms.org/maven/, to the Maven remote repositories in your build.properties in your home directory. Then download it by executing:
maven plugin:download -Dversion=1.01.00b02 -DartifactId=hippo-workflows-plugin -DgroupId=hippo
The workflow plugin has the following goals:
- workflow:prepare: build the workflow Zip file. It will be stored in directory target
- workflow:install: copy the built workflow Zip file to the local repository
- workflow:deploy: copy the built workflow Zip file to the remote repository