[jbpm-dev] [Design of JBoss jBPM] - Re: Making the BPM API more generic?

KrisVerlaenen do-not-reply at jboss.com
Mon Aug 4 11:17:41 EDT 2008


"tom.baeyens at jboss.com" wrote :  Are your API docs online ?  A link would be great.

Yes, of course, all Drools code can be found in our svn repository.  But as it might be a bit difficult to find what you need in this web of classes, let me give you a high-level overview.  Note that I will only include generic interfaces, specific process languages could extend some of these interfaces to offer more options to the end users. 

/* A process contains the definition of the business logic, specific process languages need to extend this interface. */
Process 

    void setId(String id);
    String getId();
    void setName(String name);
    String getName();
    void setVersion(String version);
    String getVersion();
    void setType(String type);
    String getType();
    void setPackageName(String packageName);
    String getPackageName();
    void setMetaData(String name, Object value);
    Object getMetaData(String name);

/** End users that want to execute processes interact with a session */
Session

    ProcessInstance startProcess(String processId);
    ProcessInstance startProcess(String processId, Map<String, Object> parameters);

    public Collection getProcessInstances();
    public ProcessInstance getProcessInstance(long id);

/** A process instance represents one instance of a process that is currently executing, specific process languages need to extend this interface */
ProcessInstance

    long getId();
    String getProcessId();
    int getState();
    void setState(int state);

    /* Events */
    void signalEvent(String type, Object event);

    /* Variable Scope */
    Object getVariable(String name);
    Map<String, Object> getVariables();
    void setVariable(String name, Object value);

/* Whenever the execution engine want to invoke external services, it does so using an abstract workitem (contains name-value parameters) */
WorkItemHandler

    void executeWorkItem(WorkItem workItem, WorkItemManager manager);
    void abortWorkItem(WorkItem workItem, WorkItemManager manager);

/* Results of these invocations can be returned to the execution engine */
WorkItemManager

    void completeWorkItem(long id, Map<String, Object> results)
    void abortWorkItem(long id)

Then there are of course also interfaces for storage and deployment, monitoring, etc.

Note that these interfaces are generic and contain nothing specific about Drools Flow.

Kris

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4168489#4168489

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4168489



More information about the jbpm-dev mailing list