Re: Metod to return activity ID

王志强 <[email protected]>
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <[email protected]>
I think the  activityid means Activity Definitin Id, maybe Activity Instance Id.

You can use try the following get the Activity Definitin Id.
public String getActivityDefId(String userName, String password,String
procInsId, String activityInsId) throws WWFException {
  String result = "";
  try {
    adminMiscUtilities.connect(userName, password, engineName, "");
    result = adminMiscUtilities.getActivityDefinitionId(procInsId,
activityInsId);
  } catch (Exception e) {
    e.printStackTrace();
  } finally {
    try {
       adminMiscUtilities.disconnect();
    } catch (Exception ex) {}
    }
   return result;
}




2005/7/25, Dahl, Greg (BLM) - contr <[email protected]>:
> Can you try something like this???:
> 
>                        WfProcess myNewProcess =
> workflowConnection.createProcess(package_id, process_id);
>                        myNewProcess.start();
> 
>                        WfActivity [] wfActivityArray =
> myNewProcess.get_sequence_step(0);      //The zero here gets ALL the
> activities, not the first one!
>                        int totalRows = wfActivityArray.length;
> 
>                        for (int i=0; i< totalRows; i++) {
>                                WfActivity currentActivity =
> wfActivityArray[i];
>                                String newActivityKey =
> currentActivity.key();
>                        }
> 
>                        String newProcessKey = myNewProcess.key();
> 
> Then you can return newActivityKey, newProcessKey, or both....
> 
> Greg
> 
> 
> 
> 
> > -----Original Message-----
> > From: Frans Thamura [mailto:[email protected]]
> > Sent: Saturday, July 23, 2005 5:51 PM
> > To: [email protected]
> > Subject: [shark] Metod to return activity ID
> >
> >
> > Hi All,
> >
> > anyone know what is the method to return activityid from process
> > instantiation?
> >
> > i try to do a process instantation,
> >
> > this is my example.
> >
> > i have an xpdl that has been loaded, we can said it
> > BusinessExmaple#1#Business_Exmaple
> >
> > i try to instantiate using processstart, and fill the name of the
> > process id BusinessExmaple#1#Business_Exmaple
> >
> > i see in the database and using SharkAdmin, the shark engine create
> > something like this
> >
> > 201_201_Business_Example_Business_Example_Wor1_Business_Exampl
> > e_Wor1_Act1
> >
> > my opinion now.
> >
> > i see there is a process that change the BusinessExmaple#1
> > tobecome an
> > activity id, but i still cannot get it.
> >
> > can anyone help me?
> >
> > Frans
> >
> >
> >
> >
> ******* Confidentiality Notice *******
> This email, its electronic document attachments, and the contents of its website linkages may contain confidential health information.  This information is intended solely for use by the individual or entity to whom it is addressed.  If you have received this information in error, please notify the sender immediately and arrange for the prompt destruction of the material and any accompanying attachments.
> 
> 
> 
> 
> 
> 
> 
> --
> You receive this message as a subscriber of the [email protected] mailing list.
> To unsubscribe: mailto:[email protected]
> For general help: mailto:[email protected]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> 
> 
>
message-footer.txt (text/plain, 271 B)
--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.