cancel
Showing results for 
Search instead for 
Did you mean: 

Document approval in activiti

wysh
Champ in-the-making
Champ in-the-making
Hi,
We are planning to create a document approval workflow in our project using activiti. First usertask is to upload the document. Groups or persons are required to approve the document. Each approver can either reject or approve the document, citing a reason. workflow automatically routes the document to the next approver if it is accepted, otherwise workflow system reroutes document to the previous person in the chain.
please let me know the possibility of this workflow in activiti…
8 REPLIES 8

jbarrez
Star Contributor
Star Contributor
please let me know the possibility of this workflow in activiti…

Sure … it is pretty much one of the basic workflows we have in Alfresco.
I'm not going to do your homework for you, but you should look into multi-instance user tasks and exclusive gateways.

wysh
Champ in-the-making
Champ in-the-making
we created a sample workflow of that…but the problem is about the activiti designer. our plan is to make a user-friendly UI to edit/create bpmn2.0 xml file. so it will be helpful for the users. Is there any other way to do it without using the  activiti designer tool..?

racadent
Champ in-the-making
Champ in-the-making
You can use Activiti Modeler which is web-based application and completely customizable.

frederikherema1
Star Contributor
Star Contributor
And if you want to create a custom UI, you should take a look at the activiti-bmpn-model en activiti-bpmn-converter projects, this offers a simple POJO-model to build processes that can be deployed immediately into the engine.

wysh
Champ in-the-making
Champ in-the-making
activiti-kickstart is the one which i needed to create my workflow…i got the source from https://github.com/jbarrez/Activiti-KickStart… As of Activiti 5.7, KickStart is no longer part of the ‘official’ Activiti dsitribution… :cry:
hope that activiti-kickstart will helps to make a simple UI…can i use it with activiti5.11…?
please reply…so i can proceed with this one…

frederikherema1
Star Contributor
Star Contributor
It's part of the distribution, it's in activiti-explorer now (as of 5.12, this week released). You can find it when you create a new process-definition, you're able to choose if you want to use the "cull" editor or the "table based" editor. The table-based, that's kickstart…

wysh
Champ in-the-making
Champ in-the-making
D:\workflow\activitiKickstart>cd trunk

D:\workflow\activitiKickstart\trunk>start-ui.cmd

D:\workflow\activitiKickstart\trunk>{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\f
onttbl{\f0\fswiss\fcharset0 Arial;}}
The system cannot find the path specified.

D:\workflow\activitiKickstart\trunk>{\*\generator Msftedit 5.41.15.1515;}\viewki
nd4\uc1\pard\f0\fs20 echo "Building Activiti "\par
The system cannot find the path specified.

D:\workflow\activitiKickstart\trunk>cd activiti-kickstart-java\par
The system cannot find the path specified.

D:\workflow\activitiKickstart\trunk>mvn clean install -DskipTests\par
[INFO] Scanning for projects…
[WARNING]
[WARNING] Some problems were encountered while building the effective model for
org.activiti:activiti-kickstart-java:jar:1.1
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-comp
iler-plugin is missing. @ line 22, column 12
[WARNING]
[WARNING] Some problems were encountered while building the effective model for
org.activiti:activiti-kickstart-rest:war:1.1
[WARNING] 'build.plugins.plugin.version' for org.zeroturnaround:jrebel-maven-plu
gin is missing. @ line 43, column 12
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-comp
iler-plugin is missing. @ org.activiti:activiti-kickstart:1.1, D:\workflow\activ
itiKickstart\trunk\pom.xml, line 25, column 12
[WARNING]
[WARNING] Some problems were encountered while building the effective model for
org.activiti:activiti-kickstart-ui:war:1.1
[WARNING] 'build.plugins.plugin.version' for org.zeroturnaround:jrebel-maven-plu
gin is missing. @ line 33, column 21
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-comp
iler-plugin is missing. @ line 22, column 21
[WARNING]
[WARNING] Some problems were encountered while building the effective model for
org.activiti:activiti-kickstartSmiley Tongueom:1.1
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-comp
iler-plugin is missing. @ line 25, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten t
he stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support buildin
g such malformed projects.
[WARNING]
[INFO] ————————————————————————
[INFO] Reactor Build Order:
[INFO]
[INFO] Activiti - KickStart
[INFO] Activiti - KickStart - Java
[INFO] Activiti - KickStart - REST
[INFO] Activiti - KickStart - UI
[INFO]
[INFO] ————————————————————————
[INFO] Building Activiti - KickStart 1.1
[INFO] ————————————————————————
[INFO]
[INFO] — maven-clean-plugin:2.4.1:clean (default-clean) @ activiti-kickstart -

[INFO]
[INFO] — maven-install-plugin:2.3.1:install (default-install) @ activiti-kicks
tart —
[INFO] Installing D:\workflow\activitiKickstart\trunk\pom.xml to C:\Documents an
d Settings\wysh\.m2\repository\org\activiti\activiti-kickstart\1.1\activiti-kick
start-1.1.pom
[INFO]
[INFO] ————————————————————————
[INFO] Building Activiti - KickStart - Java 1.1
[INFO] ————————————————————————
Downloading: http://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/maven-
metadata.xml
Downloading: http://repository.jboss.org/nexus/content/groups/public/org/jvnet/s
taxex/stax-ex/maven-metadata.xml
Downloading: https://maven.alfresco.com/nexus/content/groups/public/org/jvnet/st
axex/stax-ex/maven-metadata.xml
Downloading: http://download.java.net/maven/2/org/jvnet/staxex/stax-ex/maven-met
adata.xml
Downloaded: http://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/maven-m
etadata.xml (583 B at 1.3 KB/sec)
Downloaded: http://download.java.net/maven/2/org/jvnet/staxex/stax-ex/maven-meta
data.xml (411 B at 0.4 KB/sec)
[WARNING] Could not transfer metadata org.jvnet.staxex:stax-ex/maven-metadata.xm
l from/to alfresco (https://maven.alfresco.com/nexus/content/groups/public😞 Rem
ote host closed connection during handshake
[INFO]
[INFO] — maven-clean-plugin:2.4.1:clean (default-clean) @ activiti-kickstart-j
ava —
[INFO] Deleting D:\workflow\activitiKickstart\trunk\activiti-kickstart-java\targ
et
[INFO]
[INFO] — maven-resources-plugin:2.5:resources (default-resources) @ activiti-k
ickstart-java —
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO]
[INFO] — maven-compiler-plugin:2.3.2:compile (default-compile) @ activiti-kick
start-java —
[INFO] Compiling 229 source files to D:\workflow\activitiKickstart\trunk\activit
i-kickstart-java\target\classes
[WARNING] \workflow\activitiKickstart\trunk\activiti-kickstart-java\src\main\jav
a\org\activiti\kickstart\service\alfresco\AlfrescoKickstartServiceImpl.java:[807
,85] [deprecation] encode(String) in URLEncoder has been deprecated
[INFO]
[INFO] — maven-resources-plugin:2.5:testResources (default-testResources) @ ac
tiviti-kickstart-java —
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] — maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ activ
iti-kickstart-java —
[INFO] Compiling 4 source files to D:\workflow\activitiKickstart\trunk\activiti-
kickstart-java\target\test-classes
[INFO]
[INFO] — maven-surefire-plugin:2.10:test (default-test) @ activiti-kickstart-j
ava —
[INFO] Surefire report directory: D:\workflow\activitiKickstart\trunk\activiti-k
ickstart-java\target\surefire-reports

——————————————————-
T E S T S
——————————————————-
Running org.activiti.kickstart.dto.KickstartWorkflowDtoTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.187 sec
Running org.activiti.kickstart.dto.ScriptTaskDtoTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running org.activiti.kickstart.KickstartTest
Mar 05, 2013 5:19:24 PM org.springframework.beans.factory.xml.XmlBeanDefinitionR
eader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [activiti.cfg.xml]
Mar 05, 2013 5:19:28 PM org.activiti.engine.impl.db.DbSqlSession executeSchemaRe
source
INFO: performing create on engine with resource org/activiti/db/create/activiti.
h2.create.engine.sql
Mar 05, 2013 5:19:28 PM org.activiti.engine.impl.db.DbSqlSession executeSchemaRe
source
INFO: performing create on history with resource org/activiti/db/create/activiti
.h2.create.history.sql
Mar 05, 2013 5:19:28 PM org.activiti.engine.impl.db.DbSqlSession executeSchemaRe
source
INFO: performing create on identity with resource org/activiti/db/create/activit
i.h2.create.identity.sql
Mar 05, 2013 5:19:28 PM org.activiti.engine.impl.ProcessEngineImpl <init>
INFO: ProcessEngine default created
Mar 05, 2013 5:19:28 PM org.activiti.engine.ProcessEngines initProcessEnginFromR
esource
INFO: initializing process engine for resource file:/D:/workflow/activitiKicksta
rt/trunk/activiti-kickstart-java/target/test-classes/activiti.cfg.xml
Mar 05, 2013 5:19:28 PM org.springframework.beans.factory.xml.XmlBeanDefinitionR
eader loadBeanDefinitions
INFO: Loading XML bean definitions from resource loaded through InputStream
Mar 05, 2013 5:19:28 PM org.activiti.engine.impl.ProcessEngineImpl <init>
INFO: ProcessEngine default created
Mar 05, 2013 5:19:28 PM org.activiti.engine.ProcessEngines initProcessEnginFromR
esource
INFO: initialised process engine default
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.969 sec <<< FA
ILURE!
Running org.activiti.kickstart.service.KickstartServiceImplTest
Tests run: 16, Failures: 0, Errors: 12, Skipped: 0, Time elapsed: 1.765 sec <<<
FAILURE!

Results :

Tests in error:
  testAdhocWorkflowDeployment(org.activiti.kickstart.KickstartTest)
  testSimpleServiceTask(org.activiti.kickstart.service.KickstartServiceImplTest)

  testSimpleUserTask(org.activiti.kickstart.service.KickstartServiceImplTest)
  testSimpleEmailTask(org.activiti.kickstart.service.KickstartServiceImplTest)
  testTwoParallelServiceTasks(org.activiti.kickstart.service.KickstartServiceImp
lTest)
  testSimpleEmailTaskWithAllFields(org.activiti.kickstart.service.KickstartServi
ceImplTest)
  testEmailTaskWithSomeFieldsOnly(org.activiti.kickstart.service.KickstartServic
eImplTest)
  testDeployAndFindUserTaskWorkflow(org.activiti.kickstart.service.KickstartServ
iceImplTest)
  testDeployAndFindServiceTaskWorkflow(org.activiti.kickstart.service.KickstartS
erviceImplTest)
  testDeployAndFindEmailTaskWorkflowWithSomeElements(org.activiti.kickstart.serv
ice.KickstartServiceImplTest)
  testDeployAndFindEmailTaskWorkflowWithAllElements(org.activiti.kickstart.servi
ce.KickstartServiceImplTest)
  testSimpleScriptTask(org.activiti.kickstart.service.KickstartServiceImplTest)
  testDeployAndFindScriptTaskWorkflow(org.activiti.kickstart.service.KickstartSe
rviceImplTest)

Tests run: 24, Failures: 0, Errors: 13, Skipped: 0

[INFO] ————————————————————————
[INFO] Reactor Summary:
[INFO]
[INFO] Activiti - KickStart ………………………… SUCCESS [1.359s]
[INFO] Activiti - KickStart - Java ………………….. FAILURE [2:21.907s]
[INFO] Activiti - KickStart - REST ………………….. SKIPPED
[INFO] Activiti - KickStart - UI ……………………. SKIPPED
[INFO] ————————————————————————
[INFO] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Total time: 2:23.594s
[INFO] Finished at: Tue Mar 05 17:19:31 IST 2013
[INFO] Final Memory: 16M/46M
[INFO] ————————————————————————
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.
10:test (default-test) on project activiti-kickstart-java: There are test failur
es.
[ERROR]
[ERROR] Please refer to D:\workflow\activitiKickstart\trunk\activiti-kickstart-j
ava\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

[ERROR]   mvn <goals> -rf :activiti-kickstart-java
D:\workflow\activitiKickstart\trunk>




i got error like this while building source….what may be the reason for that..?

jbarrez
Star Contributor
Star Contributor
This has absolutely nothing to do with the original question. Please create a new topic if you'd want to see it answered.