cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Engine Karaf Commands (OSGi shell support)

schikkal
Champ in-the-making
Champ in-the-making
Hi

We are using Activiti Engine in Servicemix/Fuse OSGi container to deploy and run BPMN Processes in the OSGi container.  We are using activiti-osgi, activiti-spring, activiti-engine together (with other dependent bundles) to run the Activiti engine in the OSGi continer. So far things are working well for us. Since we want a quick CLI management interface to the bpmn process deployments, definitions and instances in the Activiti engine , we have added few Karaf commands (shell interface). 

If there is enough interest, I would like to contribute this activiti karaf commands code to the community.  Let me know if anyone looking for this type of interface to Activiti Engine in OSGi container.

Regards,
-Srinivasan

Karaf console output for Activiti commands
================================

….
[ 223] [Active     ] [            ] [       ] [   60] Commons Email (1.2)
[ 224] [Active     ] [            ] [       ] [   60] H2 Database Engine (1.3.155)
[ 226] [Active     ] [            ] [       ] [   60] Apache ServiceMix :: Bundles :: mybatis (3.0.4.1)
[ 227] [Active     ] [            ] [       ] [   60] Activiti - Engine (5.7.0)
[ 228] [Active     ] [            ] [       ] [   60] Activiti - OSGi (5.7.0)
….
karaf@root>

karaf commands for activiti engine
=========================

bpm:list   bpm:start   bpm:signal  bpm:kill   bpm:undeploy

karaf@root> bpm:list –help
DESCRIPTION
        bpm:list

        Displays information about BPMN active process instances, process definitions, history of process instances

SYNTAX
        bpm:list [options]

OPTIONS
        -d, –deployments
                Display information about all BPMN deployments
        -h, –history
                Display information about history of all process instances
        –help
                Display this help message
        -pd, –definitions
                Display information about all process definitions
        -pi, –active
                Display information about all active process instances

karaf@root> bpm:start –help
DESCRIPTION
        bpm:start

        Starts the BPMN process instance from a deployed process definition

SYNTAX
        bpm:start [options] definitionID

ARGUMENTS
        definitionID
                BPMN Process definition ID to start an instance of it.

OPTIONS
        –help
                Display this help message


karaf@root> bpm:signal –help
DESCRIPTION
        bpm:signal

        Signals any active executions in BPMN process instances

SYNTAX
        bpm:signal [options] [instanceIDs]

ARGUMENTS
        instanceIDs
                Instance IDs to signal set of active process instances

OPTIONS
        –help
                Display this help message
        -a, –all
                Signal all active process instances
        -activities, –activities
                Signal all activities in a process instances


karaf@root> bpm:kill –help
DESCRIPTION
        bpm:kill

        Kills any active BPMN process instances

SYNTAX
        bpm:kill [options] [instanceIDs]

ARGUMENTS
        instanceIDs
                Instance IDs to kill set of active process instances

OPTIONS
        –help
                Display this help message
        -a, –all
                Kill all active process instances
               
karaf@root> bpm:undeploy –help
DESCRIPTION
        bpm:undeploy

        Undeploys the BPMN Deployments(Process definition, images, bar files etc

SYNTAX
        bpm:undeploy [options] [deploymentIDs]

ARGUMENTS
        deploymentIDs
                Deployment IDs of the BPMN deployments for undeploying

OPTIONS
        -a, –all
                Undeploys all BPMN deployments
        –help
                Display this help message
        -c, –cascade
                Deletes the given deployment and cascade deletion to process instances, history process instances and
                jobs.
              
bpm:list command output
===================

karaf@root> bpm:list

BPMN Deployments
—————-
ID    Name                                                                       Deployment Time
[1705][mvn:com.cisco.workflow.examples/hello-bpmn-bundle/1.1.0-SNAPSHOT        ][Aug 30, 2011 2:00:07 PM]
[1713][mvn:com.cisco.workflow.examples/bpmn-receive-task-example/1.1.0-SNAPSHOT][Aug 30, 2011 2:13:58 PM]

BPMN Process Definitions
————————-
Definition ID                     Name                       Ver  Resource

[Hello:1:1708                    ][hello                    ][1  ][//233.fwk25337455/diagrams/hello.bpmn20.xml]
[bpmn-receive-task-example:1:1716][bpmn-receive-task-example][1  ][//235.fwk25337455/diagrams/bpmn-receive-task-example.bpmn20.xml]

History of BPMN Process Instances
———————————
Definition ID                     Inst  Start Time               End Time
[Hello:1:1708                    ][1709][Aug 30, 2011 2:00:09 PM][Aug 30, 2011 2:00:09 PM]
[bpmn-receive-task-example:1:1716][1717][Aug 30, 2011 2:14:00 PM][                       ]

Active BPMN Process Instances
—————————–
Definition ID                     Inst  Executions
[bpmn-receive-task-example:1:1716][1717][1717,1719,1720,1721]
5 REPLIES 5

trademak
Star Contributor
Star Contributor
Hi,

Very nice! This makes it a lot easier to use the OSGi approach with Activiti.
So yes if you would like to contribute it, that would be great!
Did you already signup for a developer account? If not please do that.
Then to commit it to the Activiti project, I can do that for you or you can do it yourself when you have a developer account.
Maybe you can raise a JIRA improvement issue with the source code attached and we can discuss this further there?

Best regards,

schikkal
Champ in-the-making
Champ in-the-making
Hi

Thanks for your input.  I have started the process from my side for contribution. The JIRA issues (http://jira.codehaus.org/browse/ACT-912) is raised, but I need to go through some internal approval process also to attach the source code. I have requested for the developer account on the activiti project and will complete the required process (sign up the contributor agreement etc).

http://jira.codehaus.org/browse/ACT-912

Regards,
-Srinivasan

vishalbhasin
Champ in-the-making
Champ in-the-making
Hello:

I'm interested in running Activiti inside Fuse ESB as well, was this effort completed?

Thanks!

wangyanqiong
Champ in-the-making
Champ in-the-making
I tried to install Activiti into Jboss fuse ,It prompted " No feature named 'activiti' with version '0.0.0' available", why?  How can I do?

trademak
Star Contributor
Star Contributor
And how did you do this installation exactly? Did you create an Activiti feature like explained in the Activiti in Action book or did you do it in another way?

Best regards,