Shark API application: determines the activity of the process

Source: Internet
Author: User

// Suppose we have defined the process proc1, which defines three activities, act1, Act2, and act3.

Executionadministration Ea = shark. getinstance (). getadmininterface (). getexecutionadministration ();
EA. Connect (username, password, enginename, null );

Adminmisc AM = shark. getinstance (). getadmininterface (). getadminmisc ();

// Process instance serial number, known
String procid = "1_1_proc1 ";
// Serial number of the active instance
String actid = "";

// Obtain the activity instance created so far by the process instance
Wfactivity [] wfas = EA. getprocess (procid). get_sequence_step (0 );

If (wfas! = NULL & wfas. length> 0)
{
// Obtain the serial number of the last active instance
Actid = wfas [WFA. Length-1]. Key ();
}

// Obtain the process definition number. Obtain proc1 here.
String procdefid = aM. getprocessdefinitionid (procid );
// Obtain the sequence number of the activity definition. Obtain one of act1, Act2, and act3 here.
String actdefid = aM. getactivitydefinitionid (procid, actid );

// P.s. You can see that using the shark. getinstance (). getadmininterface () method, you can obtain the shark management tool class. The API can obtain a lot of required information.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.