- Q: Cannot upload XPDL into repository.
- Q: If I have an activity, is it possible to tell which will be
the next activity/activities?
- Q: I have some problems with versioning in shark.
- Q: How to get workflows?
|
Q: | Cannot upload XPDL into repository.
<?xml version="1.0" encoding="UTF-8"?>
<Package Id="test1"
Name="mytest"
xmlns="http://www.wfmc.org/2002/XPDL1.0"
xmlns:xpdl="http://www.wfmc.org/2002/XPDL1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.wfmc.org/2002/XPDL1.0 http://wfmc.org/standards/docs/TC-1025_schema_10_xpdl.xsd">
<PackageHeader>
<XPDLVersion>1.0</XPDLVersion>
<Vendor>Together</Vendor>
<Created>2004-05-15 08:20:32</Created>
</PackageHeader>
<RedefinableHeader PublicationStatus="UNDER_TEST"/>
<ConformanceClass GraphConformance="NON_BLOCKED"/>
<WorkflowProcesses>
...
</WorkflowProcesses>
</Package>
|
A: | Shark requires that you define XPDL Script element (i.e. if
your expressions are written using JavaScript syntax, you should
have in your XPDL defined <Script
Type="text/javascript"/> ). You can look at the
examples comming with shark about how they define this XPDL
element. |
Q: | If I have an activity, is it possible to tell which will be
the next activity/activities? I don't mind if it's an AND split or an OR split, I just
want to know what might be the next tasks ? |
A: | Shark community version doesn't provide such feature
although there is an API for such purpose called AdminMiscExt but
without implementation (you will probably have to parse XPDL to
find out next possible activities). On the other hand, shark
professional provides implementation of this API. |
Q: | I have some problems with versioning in shark. -
After package updating i have two package versions but with the same package id. How can I create process from the first package version?
-
How can I get data (
org.enhydra.jawe.xml.elements.Package
object) of particular package version?
-
Is it shark use package version number defined in xpdl or has own independent versioning?
|
A: | -
You can use the version of WfProcessMgr that correspond to the first version of the Package (In our implementation, version numbers are starting with 1), and create process by using WfProcessMgr.create_process(WfRequester) (you can use null for the requester).
-
You can't get the Package object from shark interface. What you can do is to get the byte[] representing the Package.
-
Shark has an independent versioning (Version element of the Package is not mandatory attribute).
|
Q: | How to get workflows? Is there a possibility to obtain a list of all workflows
defined in an XPDL file? At the moment I parse the XPDL file
looking for the "WorkflowProcess" tags. |
A: | If you know the Id of the XPDL file, you can do the
following using ExecutionAdministration interface (after calling
connect method): WfProcessMgrIterator pmi=ea.get_iterator_processmgr(); // ea is ExecutionAdministration
String query="packageId.equals(\""+pkgId+"\")";
pmi.set_query_expression(query);
WfProcessMgr[] mgrs=pmi.get_next_n_sequence(0);
WfProcessMgr objects correspond to WorkflowProcess definitions
from XPDL. You can further use WfProcessMgr to instantiate the
process instance. You can also get the WorkflowProcess's
definition Id, Name or any other attribute using
XPDLBrowser interface. |