ALBPM Process API (PAPI)

fuego.papi
Interface ProcessServiceNESession

All Superinterfaces:
Serializable
All Known Subinterfaces:
ProcessServiceSession

public interface ProcessServiceNESession
extends Serializable

ProcessServiceNESession contains methods for creating views and presentations, and for getting activities, attachments, instances, notes, and processes. Methods to store presentation and views, to add attachments and notes, and to process activities and instances are in ProcessServiceSession.

Warning: this class will be removed, use ProcessServiceSession instead.


Method Summary
 void addHistories(InstanceStamp[] instancesStamp)
          For Internal use only.
 Presentation clonePresentation(String id)
          Clone an existing Presentation.
 void close()
          Closes the session.
 Presentation createPresentation(PresentationType presentationType, String id, Presentation.Column[] columns)
          Creates a Presentation.
 InstanceInfo createProcessInstance(String targetProcessId, Arguments arguments)
          Creates a new process instance by running the Begin activity with the specified Arguments in the specified Process.
 InstanceInfo createProcessInstance(String targetProcessId, String argumentSetName, Arguments arguments)
          Creates a new process instance by running the Begin activity with the specified Arguments in the specified Process with the specified argument set name.
 EditableView createView(ViewType viewType, String viewId, String[] assignedProcesses)
          Creates an EditableView.
 GlobalExecution customRunGlobalActivity(String activityId, Arguments arguments)
          Runs a global activity and returns a GlobalExecution to complete the activity.
customRunGlobalActivity can have user interaction, whereas runGlobalActivity cannot.
 String getActiveProcessId(String processId)
          Gets the full active process identification for the specific process from the consolidated process Id or full process Id.
For example, the consolidated process id could be "/East/Expense", and the active process id "/East/Expense#Default-2.1"; or the process id could be "/East/Expense#Default-1.0", and the active process id "/East/Expense#Default-2.1".
 String[] getActiveProcessIdsByView(View view)
          Gets the ids of the processes that are active in the specified View.
 String getActivityDocumentation(String activityId, Locale locale)
          Gets the full path to the localized documentation for the specified activityId and Locale.
 Activity getActivityForView(ActivityView view)
          Gets the Activity associated with this ActivityView.
 String[] getAllProcessVersions(String processId)
          Returns all process Id versions for the specified process.
 Activity[] getApplicationsByView(ApplicationsView view)
          Returns all Global Activities (Activity.GLOBAL and Activity.GLOBAL_CREATION) for the specified ApplicationsView.
 Attachment getAttachment(String attachmentId)
          Gets the Attachment for this attachmentId.
 Attachment getAttachmentLastVersion(String attachmentId)
          Gets the last version of the Attachment specified by attachmentId.
 Attachment[] getAttachmentsByInstance(String instanceId)
          Gets all the Attachments associated with this instance.
 Attachment[] getAttachmentsByView(AttachmentsView view)
          Gets the Attachments from this AttachmentsView.
 Attachment[] getAttachmentVersions(String attachmentId)
          Gets all the Attachments associated with this attachment.
 String[] getBookmarks()
          Gets bookmarks for the current participant.
 Calendar getCalendar()
          Gets the calendar set with the session Locale and TimeZone.
 Map getChildrenViews(String viewId)
          Gets the child views of the view specified by view Id.
 Consult getConsult(String instanceId)
          Gets the Consult associated with the specified instanceId, or null if there is no consultation.
 String[] getConsults()
          Gets all the Consults for this session.
 Presentation getDefaultPresentation(PresentationType presentationType)
          Gets the predefined default Presentation for the specified PresentationType.
 EditableView getEditableView(View view)
          Gets an EditableView from a View.
 Activity[] getGlobalActivities(Process[] processes)
          Gets all Global Activities (Activity.GLOBAL, Activity.GLOBAL_AUTOMATIC and Activity.GLOBAL_CREATION) for the specified processes.
 Activity[] getGlobalActivities(Process[] processes, int activityType, boolean hasInstanceAccess)
          Gets all the Global Activities for the specified processes, type, and instance access.
 Activity[] getGlobalActivities(String[] processIds)
          Gets all the Global Activities for the specified processIds.
 Activity[] getGlobalActivities(String[] processIds, int type, boolean hasInstanceAccess)
          Gets all the Global Activities for the specified processes, type, and instance access.
 Activity[] getGrabActivitiesForInstance(InstanceInfo instance)
          Gets all the grab activities that can grab this instance.
 String getHost()
          Returns the host where the owner of this session is connected from.
 InstanceInfo getInstance(InstanceStamp stamp)
          Gets the InstanceInfo specified by this InstanceStamp.
 InstanceInfo getInstance(String instanceId)
          Gets the InstanceInfo specified by instanceId.
 InstanceInfo getInstanceByCorrelation(String processId, String correlationName, Object[] correlationValues)
          Gets the instance specified by the process id, correlation name, and correlation values.
 DynamicObject getInstanceData(String instanceId)
          Gets the instance component associated with this instance.
The instance component is the instance of the class generated during the deployment.
 InstanceEvent[] getInstanceEvents(String instanceId)
          Returns the InstanceEvents for the specified instanceId.
 Note[] getInstanceNotes(String instanceId)
          Gets all the Notes associated with the specified instance.
 InstanceInfo[] getInstances(String processId)
          Gets the InstanceInfos from the specified Process.
 InstanceInfo[] getInstancesByFilter(String[] processIds, Filter filter)
          Gets InstanceInfos from the specified ProcessIds and match with the specified Filter.
 InstanceInfo[] getInstancesByView(InstancesView view)
          Gets the InstanceInfos from the specified instances view.
 Locale getLocale()
          Deprecated. user getUserLocale() instead.
 Note getNote(String noteId)
          Gets the Note specified by this noteId.
 Note[] getNotes(String instanceId)
          Deprecated. use getInstanceNotes(java.lang.String) instead
 String getOrganization()
          Gets the organization name.
 View getParentView(View view)
          Gets the parent View of the specified View.
 String getParentViewId(String viewId)
          Deprecated. use getParentView(View) instead.
 Participant getParticipant()
          Gets the Participant for this session.
 Participant getParticipant(String uid)
          Gets the Participant specified by participantUid.
 Presentation getPresentation(PresentationType presentationType, String presentationId)
          Gets the Presentation for the specified PresentationType and presentationId.
 Presentation getPresentation(String presentationId)
          Gets the Presentation specified by this presentationId.
 String[] getPresentationIds(PresentationType presentationType)
          Gets all the presentationIds for the specified PresentationType.
 Process getProcess(int processIn)
          Gets the Process for this process identification number.
 Process getProcess(String processId)
          Gets the Process for this processId.
 ProcessDiagram getProcessDiagram(int processIn)
          Gets the ProcessDiagram for the specified process by process identification number.
 ProcessDiagram getProcessDiagram(Process process)
          Gets the ProcessDiagram for the specified Process.
 ProcessDiagram getProcessDiagram(String processId)
          Gets the ProcessDiagram for the specified processId.
 String getProcessDocumentation(String processId, Locale locale)
          Gets the local path of the process documentation, created in Studio, for the specified locale.
 Process[] getProcesses(boolean force)
          Gets all deployed Processes for the session.
 Process[] getProcesses(boolean onlyActiveProcess, boolean force)
          Gets all deployed Processes for the session.
 String getProcessId(InstanceInfo instance)
          Gets the processId from the specified instanceInfo.
 String getProcessId(int processIn)
          Gets the processId from the specified process identification number.
 String[] getProcessIds()
          Gets the Ids of all deployed processes (Active and Deprecated versions) for this session.
 String[] getProcessIds(boolean onlyActiveProcess)
          Gets the Ids of all deployed processes for this session, and optionally only active processes.
 String getProcessImage(String processId)
          Gets the process image in XML format for the specified processId.
 int getProcessIn(String processId)
          Gets the process identification number for this processId.
 Map getSecureEngines()
          For internal use only.
 TimeZone getTimeZone()
          Deprecated. use getUserTimeZone() instead.
 Locale getUserLocale()
          Returns the user Locale.
 TimeZone getUserTimeZone()
          Returns the user Time Zone.
 VarDefinition getVar(String variableId)
          Gets a VarDefinition from the loaded processes in this session.
 VarDefinition[] getVars()
          Returns all the variable definitions from all the processes in this session.
 View getView(String viewId)
          Returns the View specified by viewId.
 String[] getViewIds()
          Gets all the viewIds available to this participant.
 String[] getVisibleActivities(String processId)
          Gets all the activities visible to this participant in the specified process.
 Attachment[] getWorkingAttachments(String processId)
          Returns all Attachments locked by this participant in the specified process.
 boolean hasNewInstances()
          Returns true if any view has new instances since the last access to it.
 boolean hasNewInstances(String viewId)
          Returns true if this view has new instances since the last access.
 boolean instanceHasAttachments(String instanceId)
          Returns true if the specified instance has attachments.
 boolean instanceHasNotes(String instanceId)
          Returns true if the specified instance has notes.
 boolean isExclusive()
          Deprecated. Now all sessions are not exclusive.
 boolean isOpened()
          Returns true if this session is open.
 void refresh(InstanceInfo instanceInfo)
          Forces the reload of the specified InstanceInfo.
 Map retrieveRoleProperties(String roleId, String category)
          Returns a Map with all properties for the specified category for the specified role.
 Map retrieveUserProperties(String category)
          Returns a Map with all participant properties for the specified category.
 String retrieveUserStringProperty(String category, String key)
          Returns a participant property.
 InstanceInfo runGlobalActivity(String activityId)
          Runs the specified Global Activity with no arguments.
 InstanceInfo runGlobalActivity(String activityId, Arguments arguments)
          Runs the specified Global Activity with the specified arguments

The global activity cannot interact with a user; if user interaction is required, use customRunGlobalActivity(String, Arguments).

 void runProcess(String targetProcessId, String argumentsSetName, Arguments arguments, long timeout)
          Creates a new process instance in the specified Process and waits for the instance to reach the End activity up to the specified timeout.
 Participant[] searchParticipantsByName(String name)
          Returns an array of Participants that match the specified name using a substring search.
 void sendNotification(String targetInstanceOrProcessId, String activityName, Arguments notification)
          Deprecated. use sendNotification(String,String,String,Arguments) instead.
 void sendNotification(String targetInstanceOrProcessId, String activityName, Arguments notification, String sourceInstanceId)
          Deprecated. use sendNotification(String, String, String, Arguments, String) instead
 void sendNotification(String targetInstanceOrProcessId, String activityName, String targetArgumentsSetName, Arguments notification)
          Sends a external notification to a process instance.
 void sendNotification(String targetInstanceOrProcessId, String activityName, String targetArgumentsSetName, Arguments notification, String sourceInstanceId)
          Sends a notification to a process in a parent/child relationship or for an external wait/interruption with the specified argument set.
 void setDefaultOrderByForViews(String variable, boolean ascendingOrder)
          Sets the default sort order for instance views.
 void setLocale(Locale locale)
          Deprecated. use updateUserLocale(Locale) instead.
 void setTimeZone(TimeZone timezone)
          Deprecated. use updateUserTimeZone(java.util.TimeZone) instead.
 void storeUserProperties(String category, Map properties)
          Stores user properties.
 void updateUserLocale(Locale locale)
          Updates the user locale and stores it.
 void updateUserTimeZone(TimeZone timeZone)
          Updates the user time zone and stores it.
 

Method Detail

getGlobalActivities

public Activity[] getGlobalActivities(Process[] processes,
                                      int activityType,
                                      boolean hasInstanceAccess)
                               throws BatchOperationException
Gets all the Global Activities for the specified processes, type, and instance access.

Parameters:
processes - array of processes to check for global activities. Cannot be null.
activityType - one of Activity.GLOBAL_AUTOMATIC, Activity.GLOBAL_CREATION or Activity.GLOBAL.
hasInstanceAccess - whether the global activity has access to instance variables.
Returns:
Global Activities for the specified processes, type, and instance access.
Throws:
BatchOperationException - if the session could not perform the operation over every process.
May be one of the following subclasses of BatchOperationException:
See Also:
Activity.GLOBAL, Activity.GLOBAL_AUTOMATIC, Activity.GLOBAL_CREATION, Activity.hasInstanceAccess(), getGlobalActivities(Process[]), getGlobalActivities(String[]), getGlobalActivities(String[], int, boolean)

getGlobalActivities

public Activity[] getGlobalActivities(Process[] processes)
                               throws BatchOperationException
Gets all Global Activities (Activity.GLOBAL, Activity.GLOBAL_AUTOMATIC and Activity.GLOBAL_CREATION) for the specified processes.

Parameters:
processes - array of processes to check for global activities. Cannot be null.
Returns:
Global Activities for the specified processes.
Throws:
BatchOperationException - if the session could not perform the operation over every process.
May be one of the following subclasses of BatchOperationException:

getGlobalActivities

public Activity[] getGlobalActivities(String[] processIds,
                                      int type,
                                      boolean hasInstanceAccess)
                               throws BatchOperationException,
                                      OperationException
Gets all the Global Activities for the specified processes, type, and instance access.

Parameters:
processIds - array of processes to check for global activities. Cannot be null.
type - one of Activity.GLOBAL_AUTOMATIC, Activity.GLOBAL_CREATION or Activity.GLOBAL.
hasInstanceAccess - whether the global activity has access to instance variables.
Returns:
Global Activities for the specified processes, type, and instance access.
Throws:
BatchOperationException - if the session could not perform the operation over every process.
May be one of the following subclasses of BatchOperationException:
OperationException - if the session could not perform the operation.
See Also:
Activity.GLOBAL, Activity.GLOBAL_AUTOMATIC, Activity.GLOBAL_CREATION, Activity.hasInstanceAccess(), getGlobalActivities(Process[]), getGlobalActivities(String[]), getGlobalActivities(Process[], int, boolean)

getGlobalActivities

public Activity[] getGlobalActivities(String[] processIds)
                               throws BatchOperationException,
                                      OperationException
Gets all the Global Activities for the specified processIds.

Parameters:
processIds - array of processIds to check for global activities. Cannot be null.
Returns:
Global Activities for the specified processIds.
Throws:
OperationException - if the session could not perform the operation.
BatchOperationException - if the session could not perform the operation over every process.
May be one of the following subclasses of BatchOperationException:

instanceHasAttachments

public boolean instanceHasAttachments(String instanceId)
                               throws OperationException
Returns true if the specified instance has attachments.

Parameters:
instanceId - Id of the instance to check for attachments. Cannot be null.
Returns:
true if the specified instance has attachments.
Throws:
OperationException - if the session could not perform the operation.
May be one of the following subclasses of OperationException:
See Also:
Attachment

instanceHasNotes

public boolean instanceHasNotes(String instanceId)
                         throws OperationException
Returns true if the specified instance has notes.

Parameters:
instanceId - Id of the instance to check for notes. Cannot be null.
Returns:
true if the specified instance has notes.
Throws:
OperationException - if the session could not perform the operation.
May be one of the following subclasses of OperationException:

getActiveProcessId

public String getActiveProcessId(String processId)
Gets the full active process identification for the specific process from the consolidated process Id or full process Id.
For example, the consolidated process id could be "/East/Expense", and the active process id "/East/Expense#Default-2.1"; or the process id could be "/East/Expense#Default-1.0", and the active process id "/East/Expense#Default-2.1".

Parameters:
processId - full process id in the format "/OrganizationalUnit/ProcessName#Variation-Mayor.minor" or consolidated process Id in the format "/OrganizationalUnit/ProcessName". Cannot be null.
Returns:
the full active process identification for the specific process.

getActiveProcessIdsByView

public String[] getActiveProcessIdsByView(View view)
Gets the ids of the processes that are active in the specified View.

Parameters:
view - View to check for active processes. Cannot be null.
Returns:
the ids of the processes that are active in the specified View.
See Also:
View.getAssignedProcesses(), Process.isActive()

getActivityDocumentation

public String getActivityDocumentation(String activityId,
                                       Locale locale)
                                throws OperationException
Gets the full path to the localized documentation for the specified activityId and Locale.

Parameters:
activityId - Id of the activity that contains the localized documentation. Cannot be null.
locale - locale of the localized documentation. Cannot be null.
Returns:
the full path to the localized documentation for the specified activityId and locale.
Throws:
OperationException - if the session could not perform the operation.
May be one of the following subclasses of OperationException:
See Also:
Activity.getDocumentationMap()

getActivityForView

public Activity getActivityForView(ActivityView view)
Gets the Activity associated with this ActivityView.

Parameters:
view - ActivityView to test.
Returns:
Activity associated with this ActivityView.
See Also:
Activity.getActivityName()

getAllProcessVersions

public String[] getAllProcessVersions(String processId)
Returns all process Id versions for the specified process.

Parameters:
processId - process Id or consolidated process Id. Cannot be null.
Returns:
all process Id versions for the specified process.

getApplicationsByView

public Activity[] getApplicationsByView(ApplicationsView view)
                                 throws OperationException,
                                        BatchOperationException
Returns all Global Activities (Activity.GLOBAL and Activity.GLOBAL_CREATION) for the specified ApplicationsView.

Parameters:
view - applications view to check. Cannot be null.
Returns:
all Global Activities (Activity.GLOBAL and Activity.GLOBAL_CREATION) for the specified applications view.
Throws:
OperationException - if the session could not perform the operation.
BatchOperationException - if the session could not perform the operation over every view.
May be one of the following subclasses of BatchOperationException:
See Also:
View.getAssignedProcesses(), getGlobalActivities(String[])

getAttachment

public Attachment getAttachment(String attachmentId)
                         throws OperationException
Gets the Attachment for this attachmentId.

Parameters:
attachmentId - attachment Id. Cannot be null.
Returns:
Attachment for this attachmentId.
Throws:
OperationException - if the session was unable to retrieve this attachment.
May be one of the following subclasses of OperationException:

getAttachmentLastVersion

public Attachment getAttachmentLastVersion(String attachmentId)
                                    throws OperationException
Gets the last version of the Attachment specified by attachmentId.

Parameters:
attachmentId - Id of the attachment to test. Cannot be null.
Returns:
last version of the Attachment specified by attachmentId.
Throws:
OperationException - if the session was unable to retrieve the last version of the attachment.
May be one of the following subclasses of OperationException:

getAttachmentVersions

public Attachment[] getAttachmentVersions(String attachmentId)
                                   throws OperationException
Gets all the Attachments associated with this attachment. This does not return the Attachments in any specific order.

A new attachment version is created when an attachment is checked out and a new version is checked in.

Parameters:
attachmentId - Id of the attachment to test. Cannot be null.
Returns:
Array of attachment versions associated with this attachment.
Throws:
OperationException - if the session was unable to retrieve the all versions of the attachment.
May be one of the following subclasses of OperationException:
See Also:
to get the last attachment., ProcessServiceSession.checkOutAttachment(Attachment, String), ProcessServiceSession.checkInAttachment(Attachment, String, java.io.File), ProcessServiceSession.obtainEditionLock(Attachment)

getAttachmentsByInstance

public Attachment[] getAttachmentsByInstance(String instanceId)
                                      throws OperationException
Gets all the Attachments associated with this instance.

Parameters:
instanceId - Id of the instance to test. Cannot be null.
Returns:
array of attachments associated with this instance, or 0-length array if there are no associated attachments.
Throws:
OperationException - if the session was unable to retrieve the attachments for the instance.
May be one of the following subclasses of OperationException:

getAttachmentsByView

public Attachment[] getAttachmentsByView(AttachmentsView view)
                                  throws BatchOperationException
Gets the Attachments from this AttachmentsView.

Parameters:
view - attachments view. An attachment view is a view of checked-out attachments. Cannot be null.
Returns:
Array of Attachments from this AttachmentsView, or zero-length array if there are no attachments in this attachments view.
Throws:
BatchOperationException - if the session could not perform the operation over every process.
May be one of the following subclasses of BatchOperationException:

getBookmarks

public String[] getBookmarks()
                      throws OperationException
Gets bookmarks for the current participant.

Returns:
array of bookmarked instanceIds.
Throws:
OperationException - if the session was unable to retrieve the bookmarks.
See Also:
ProcessServiceSession.addBookmarks(InstanceStamp[])

getCalendar

public Calendar getCalendar()
Gets the calendar set with the session Locale and TimeZone.

Returns:
calendar set with the session Locale and TimeZone.

getChildrenViews

public Map getChildrenViews(String viewId)
Gets the child views of the view specified by view Id.

Parameters:
viewId - Id of View to check for children. Cannot be null.
Returns:
Map where keys are viewIds and values are Views. If the view does not have children returns an empty Map.

getConsult

public Consult getConsult(String instanceId)
                   throws OperationException
Gets the Consult associated with the specified instanceId, or null if there is no consultation.

Parameters:
instanceId - instance Id to check. Cannot be null.
Returns:
Consult associated with the specified instanceId, or null if there is no Consult.
Throws:
OperationException - if the session was unable to retrieve the consultations for the instance.
See Also:
ProcessServiceSession.instancesAddConsult(InstanceStamp[], String, String)

getConsults

public String[] getConsults()
                     throws OperationException
Gets all the Consults for this session.

Returns:
array of instanceIds for instances what have Consults.
Throws:
OperationException - if the session was unable to retrieve the consultations.

setDefaultOrderByForViews

public void setDefaultOrderByForViews(String variable,
                                      boolean ascendingOrder)
                               throws InvalidVariableIdException
Sets the default sort order for instance views.

Parameters:
variable - an Id from one of the VarDefinitions specified in VarDefinition.createInstanceDefaults() or an External VarDefinition added to a Process. Cannot be null.
ascendingOrder - ascending if true descending if false.
Throws:
InvalidVariableIdException - if the variable does not exists.

getDefaultPresentation

public Presentation getDefaultPresentation(PresentationType presentationType)
Gets the predefined default Presentation for the specified PresentationType.

Parameters:
presentationType - one of the static PresentationType. Cannot be null.
Returns:
default Presentation for the specified presentationType.

getEditableView

public EditableView getEditableView(View view)
                             throws ViewOperationException
Gets an EditableView from a View. A view cannot be edited directly; first call this method, then make changes on the view, and then call ProcessServiceSession.storeView(View) to store the view.

You could edit a view only if you are the owner or the view is not read only.

Parameters:
view - readable view. Cannot be null.
Returns:
Editable view if the view is readable; otherwise null.
Throws:
ViewOperationException - if the session could not get the editable view.
See Also:
ProcessServiceSession.storeView(View)

isExclusive

public boolean isExclusive()
Deprecated. Now all sessions are not exclusive.

Always returns false.


getGrabActivitiesForInstance

public Activity[] getGrabActivitiesForInstance(InstanceInfo instance)
                                        throws OperationException
Gets all the grab activities that can grab this instance.

Parameters:
instance - InstanceInfo to check. Cannot be null.
Returns:
Array of activities that can grab this instance, or a zero-length array if there are no grab activities.
Throws:
OperationException - if the session was unable to retrieve the activities.
May be one of the following subclasses of OperationException:

getHost

public String getHost()
Returns the host where the owner of this session is connected from.

Returns:
the host where the owner of this session is connected from.

getInstance

public InstanceInfo getInstance(InstanceStamp stamp)
                         throws OperationException
Gets the InstanceInfo specified by this InstanceStamp.

Parameters:
stamp - InstanceStamp, which contains the instanceId and activityName. Cannot be null.
Returns:
InstanceInfo specified by this instanceStamp.
Throws:
OperationException - if the session was unable to retrieve the instance.
May be one of the following subclasses of OperationException:

getInstance

public InstanceInfo getInstance(String instanceId)
                         throws OperationException
Gets the InstanceInfo specified by instanceId.

Parameters:
instanceId - Id of instance to retrieve. Cannot be null.
Returns:
InstanceInfo specified by instanceId.
Throws:
OperationException - if the session was unable to retrieve the instance.
May be one of the following subclasses of OperationException:

getInstanceByCorrelation

public InstanceInfo getInstanceByCorrelation(String processId,
                                             String correlationName,
                                             Object[] correlationValues)
                                      throws OperationException
Gets the instance specified by the process id, correlation name, and correlation values.

Correlations are set during Argument Mapping in Studio. Unlike arguments, there is no way to retrieve the correlation name or values programmatically.

Parameters:
processId - id of process to check. Cannot be null.
correlationName - correlation name. Cannot be null.
correlationValues - correlation values.
Returns:
instance specified by the process id, correlation name, and correlation values.
Throws:
OperationException - if the session was unable to retrieve the the instance.
May be one of the following subclasses of OperationException:

getInstanceData

public DynamicObject getInstanceData(String instanceId)
                              throws OperationException
Gets the instance component associated with this instance.
The instance component is the instance of the class generated during the deployment.

Parameters:
instanceId - instance to check. Cannot be null.
Returns:
DynamicObject containing instance component.
Throws:
OperationException - if the session was unable to retrieve the instance data.
May be one of the following subclasses of OperationException:

getInstanceEvents

public InstanceEvent[] getInstanceEvents(String instanceId)
                                  throws OperationException
Returns the InstanceEvents for the specified instanceId.

Parameters:
instanceId - instance Id to check. Cannot be null.
Returns:
InstanceEvents for the specified instanceId.
Throws:
OperationException - if the session was unable to retrieve the instance events.
May be one of the following subclasses of OperationException:

getInstanceNotes

public Note[] getInstanceNotes(String instanceId)
                        throws OperationException
Gets all the Notes associated with the specified instance.

Parameters:
instanceId - Id of instance to check for notes. Cannot be null.
Returns:
array of Notes associated with the specified instance, or zero-length array if there are no Notes associated with this instance
Throws:
OperationException - if the session was unable to retrieve the instance notes.
May be one of the following subclasses of OperationException:

getInstances

public InstanceInfo[] getInstances(String processId)
                            throws OperationException
Gets the InstanceInfos from the specified Process.

Parameters:
processId - process Id. Cannot be null.
If the Id is in the format "/OrganizationalUnit/ProcessName#Variation-Mayor.minor" it will use that specific process, and if the id is in the format "/OrganizationalUnit/ProcessName" (consolidated process id) it will get instances from all process versions.
Returns:
array of InstanceInfo from the specified Process, or zero-length array if there are no instances in the specified Process.
Throws:
OperationException - if the session was unable to retrieve the process instances.
May be one of the following subclasses of OperationException:

getInstancesByFilter

public InstanceInfo[] getInstancesByFilter(String[] processIds,
                                           Filter filter)
                                    throws BatchOperationException
Gets InstanceInfos from the specified ProcessIds and match with the specified Filter.

Ex.

     // Search instances which begin with a specific string in an external variable value and
     // stay in a specific activity.
     Filter filter = ProcessService.createFilter();
     filter.setSearchScope(ParticipantScope.ALL_IN_ROLE, StatusScope.INPROCESS);
     filter.setMatchAll(true);
     filter.addAttribute(session.getVar("MyExternalVariable"), Comparison.BEGIN_WITH, "Fuego");
     filter.addAttribute(session.getVar(VarDefinition.ACTIVITY_ID, Comparison.IS, "ActivityName");

     // Search instances.
     InstanceInfo[] instances = session.getInstancesByFilter(new String[] { "/OU/MyProcess" }, filter);
 

Parameters:
processIds - process Ids. Cannot be null.
filter - Filter to restrict and order the instances returned. Cannot be null.
Returns:
array of InstanceInfo from the specified Processes and Filter, or zero-length array if there are no matching instances
Throws:
BatchOperationException - if the session could not perform the operation over every process.
May be one of the following subclasses of BatchOperationException:

getInstancesByView

public InstanceInfo[] getInstancesByView(InstancesView view)
                                  throws OperationException,
                                         BatchOperationException
Gets the InstanceInfos from the specified instances view.

Ex.

     // Gets the view to obtain its instances
     InstancesView instancesView = (InstancesView) session.getView("MyInstancesViewId");

     // Search instances.
     InstanceInfo[] instances = session.getInstancesByView(instancesView);
 

Parameters:
view - View to retrieve instances from. Cannot be null.
Returns:
array of InstanceInfo from the specified view, or zero-length array if there are no instances in the specified View.
Throws:
OperationException - if the session was unable to retrieve the process instances.
May be one of the following subclasses of OperationException:
BatchOperationException - if the session could not perform the operation over every process.
May be one of the following subclasses of BatchOperationException:
See Also:
getViewIds(), getView(String)

setLocale

public void setLocale(Locale locale)
               throws OperationException
Deprecated. use updateUserLocale(Locale) instead.

Sets the locale for this session for receiving messages from PAPI.

Parameters:
locale - for receiving messages from PAPI. Cannot be null.
Throws:
OperationException - if the session was unable to set the new locale.

getLocale

public Locale getLocale()
Deprecated. user getUserLocale() instead.

Gets the Locale for this session.

Returns:
Locale for this session.

getNote

public Note getNote(String noteId)
             throws OperationException
Gets the Note specified by this noteId.

Parameters:
noteId - Id of the note to retrieve. Cannot be null.
Returns:
Note specified by this noteId.
Throws:
OperationException - if the session was unable to retrieve the note.
May be one of the following subclasses of OperationException:

getNotes

public Note[] getNotes(String instanceId)
                throws OperationException
Deprecated. use getInstanceNotes(java.lang.String) instead

Gets the Notes associated with this instanceId.

Parameters:
instanceId - Id of the instance to check for notes. Cannot be null.
Returns:
Notes associated with this instanceId, or zero-length array if there are no Notes associated with this instanceId.
Throws:
OperationException - if the session was unable to retrieve the note.
May be one of the following subclasses of OperationException:

isOpened

public boolean isOpened()
Returns true if this session is open.

Returns:
true if this session is open.
See Also:
close()

getOrganization

public String getOrganization()
Gets the organization name.

Returns:
organization name.

getParentView

public View getParentView(View view)
                   throws OperationException
Gets the parent View of the specified View.

Parameters:
view - child view. Cannot be null.
Returns:
parent View of the specified view, or null if the specified view does not have a parent.
Throws:
OperationException - if the session was unable to retrieve the parent view.
May be one of the following subclasses of OperationException:

getParentViewId

public String getParentViewId(String viewId)
Deprecated. use getParentView(View) instead.

Gets the id of the parent view of the specified view.

Parameters:
viewId - Id of the view to check. Cannot be null.
Returns:
id of the parent view of the specified view or null if not have a parent.

getParticipant

public Participant getParticipant()
Gets the Participant for this session.

Returns:
Participant for this session.

getParticipant

public Participant getParticipant(String uid)
                           throws OperationException
Gets the Participant specified by participantUid.

Parameters:
uid - Uid of participant. Cannot be null.
Returns:
Participant specified by participantUid.
Throws:
OperationException - if the session was unable to retrieve the participant.
May be one of the following subclasses of OperationException:

getPresentation

public Presentation getPresentation(String presentationId)
Gets the Presentation specified by this presentationId.

Parameters:
presentationId - Presentation Id. Cannot be null.
Returns:
Presentation specified by presentationId.

getPresentation

public Presentation getPresentation(PresentationType presentationType,
                                    String presentationId)
                             throws OperationException
Gets the Presentation for the specified PresentationType and presentationId.

If presentationId is "default", returns the default presentation for presentationType.

Parameters:
presentationType - one of the static PresentationTypes. Cannot be null.
presentationId - Id of presentation to retrieve. Cannot be null.
Returns:
Presentation specified by presentationType and presentationId.
Throws:
OperationException - if the session was unable to retrieve the presentation.
May be one of the following subclasses of OperationException:

getPresentationIds

public String[] getPresentationIds(PresentationType presentationType)
                            throws OperationException
Gets all the presentationIds for the specified PresentationType.

Parameters:
presentationType - one of the static PresentationTypes. Cannot be null.
Returns:
array of presentationIds.
Throws:
OperationException - if the session was unable to retrieve the presentations.

getProcess

public Process getProcess(int processIn)
Gets the Process for this process identification number.

Parameters:
processIn - process identification number.
Returns:
Process specified by processIn.

getProcess

public Process getProcess(String processId)
                   throws OperationException
Gets the Process for this processId.

Parameters:
processId - Id of the Process to retrieve. Cannot be null. If the Id is in the format "/OrganizationalUnit/ProcessName#Variation-Mayor.minor" it will use that specific process, and if the id is in the format "/OrganizationalUnit/ProcessName" (consolidated process id) it will get the active process from this consolidated id.
Returns:
Process specified by processId.
Throws:
OperationException - if the session was unable to retrieve the process.
May be one of the following subclasses of OperationException:

getProcessDiagram

public ProcessDiagram getProcessDiagram(String processId)
                                 throws OperationException
Gets the ProcessDiagram for the specified processId.

Parameters:
processId - Id of the process for this ProcessDiagram. Cannot be null. If the Id is in the format "/OrganizationalUnit/ProcessName#Variation-Mayor.minor" it will use that specific process, and if the id is in the format "/OrganizationalUnit/ProcessName" (consolidated process id) it will get the active process from this consolidated id.
Returns:
ProcessDiagram
Throws:
OperationException - if the session was unable to retrieve the process diagram.
May be one of the following subclasses of OperationException:

getProcessDiagram

public ProcessDiagram getProcessDiagram(int processIn)
                                 throws OperationException
Gets the ProcessDiagram for the specified process by process identification number.

Parameters:
processIn - process identification number.
Returns:
ProcessDiagram
Throws:
OperationException - if the session was unable to retrieve the process diagram.
May be one of the following subclasses of OperationException:

getProcessDiagram

public ProcessDiagram getProcessDiagram(Process process)
                                 throws OperationException
Gets the ProcessDiagram for the specified Process.

Parameters:
process - Process. Cannot be null.
Returns:
ProcessDiagram
Throws:
OperationException - if the session was unable to retrieve the process diagram.
May be one of the following subclasses of OperationException:

getProcessDocumentation

public String getProcessDocumentation(String processId,
                                      Locale locale)
                               throws OperationException
Gets the local path of the process documentation, created in Studio, for the specified locale.

The process documentation is retrieved from the engine and stored in the returned path, along with the images used by the documentation. The HTML file is always stored using UTF-8 encoding.

Parameters:
processId - Id of the process to check. Cannot be null.
locale - of the requested documentation. Cannot be null.
Returns:
local path of the process documentation for the specified locale, or null if there is no documentation for the specified locale.
Throws:
OperationException - if the session could not perform the operation.
May be one of the following subclasses of OperationException:

getProcessId

public String getProcessId(InstanceInfo instance)
Gets the processId from the specified instanceInfo.

Parameters:
instance - InstanceInfo to check. Cannot be null.
Returns:
processId from the specified instanceInfo.

getProcessId

public String getProcessId(int processIn)
                    throws ProcessNotAvailableException
Gets the processId from the specified process identification number.

Parameters:
processIn - process identification number
Returns:
processId from the specified process identification number.
Throws:
ProcessNotAvailableException - if the process is not available.

getProcessIds

public String[] getProcessIds()
Gets the Ids of all deployed processes (Active and Deprecated versions) for this session.

Returns:
Ids of all deployed processes (Active and Deprecated versions) for this session.

getProcessIds

public String[] getProcessIds(boolean onlyActiveProcess)
Gets the Ids of all deployed processes for this session, and optionally only active processes.

Parameters:
onlyActiveProcess - if true, then only active processes. If false, then active and deprecated processes.
Returns:
Ids of all deployed processes for this session, and optionally only active processes.

getProcessImage

public String getProcessImage(String processId)
Gets the process image in XML format for the specified processId.

Parameters:
processId - Id of the process for this process image
Returns:
process image in XML format for the specified processId.

getProcessIn

public int getProcessIn(String processId)
                 throws ProcessNotAvailableException
Gets the process identification number for this processId.

Parameters:
processId - process Id. Cannot be null.
Returns:
process identification number for this processId.
Throws:
ProcessNotAvailableException - if the process is not available.

getProcesses

public Process[] getProcesses(boolean force)
                       throws BatchOperationException
Gets all deployed Processes for the session.

Parameters:
force - true to return all processes. And false to return only loaded process and do not throw exceptions if the load process failed.
Returns:
Array of deployed Processes.
Throws:
BatchOperationException - if not all deployed processes are available.
May be one of the following subclasses of BatchOperationException:

getProcesses

public Process[] getProcesses(boolean onlyActiveProcess,
                              boolean force)
                       throws BatchOperationException
Gets all deployed Processes for the session.

Parameters:
onlyActiveProcess - true gets only active processes. false gets active and deprecated processes.
force - true returns all processes, and throw exceptions if the load process failed. false returns only loaded process and do not throw exceptions if the load process failed.
Returns:
all deployed Processes.
Throws:
BatchOperationException - if not all deployed processes are available.
May be one of the following subclasses of BatchOperationException:

getSecureEngines

public Map getSecureEngines()
For internal use only.


setTimeZone

public void setTimeZone(TimeZone timezone)
Deprecated. use updateUserTimeZone(java.util.TimeZone) instead.

Sets the TimeZone.

Parameters:
timezone - new TimeZone.

getTimeZone

public TimeZone getTimeZone()
Deprecated. use getUserTimeZone() instead.

Gets the TimeZone for this session.

Returns:
TimeZone for this session.

getVar

public VarDefinition getVar(String variableId)
Gets a VarDefinition from the loaded processes in this session.

Parameters:
variableId - Id of VarDefinition associated with a Process.
Returns:
VarDefinition from the loaded processes in this session, or null if there is no matching VarDefinition.

getVars

public VarDefinition[] getVars()
Returns all the variable definitions from all the processes in this session.

Returns:
all the variable definitions from all the processes in this session.

getView

public View getView(String viewId)
             throws OperationException
Returns the View specified by viewId.

Parameters:
viewId - view Id. Cannot be null. To retrieve the default inbox view, use View.INBOX_DEFAULT_ID
Returns:
the View specified by viewId.
Throws:
OperationException - if the session could not retreive the view.
May be one of the following subclasses of OperationException:

getViewIds

public String[] getViewIds()
                    throws OperationException,
                           BatchOperationException
Gets all the viewIds available to this participant.

Returns:
Array of viewIds available to this participant, or a zero-length array if no processes were found for this session.
Throws:
OperationException - if the session could not perform the operation.
BatchOperationException - if the session could not retrieve all view ids.

getVisibleActivities

public String[] getVisibleActivities(String processId)
                              throws OperationException
Gets all the activities visible to this participant in the specified process.

Parameters:
processId - the process to search for visible activities. Cannot be null. If the Id is in the format "/OrganizationalUnit/ProcessName#Variation-Mayor.minor" it will use that specific process, and if the id is in the format "/OrganizationalUnit/ProcessName" (consolidated process id) it will get the active process from this consolidated id.
Returns:
array of activityIds
Throws:
OperationException - if the session could not retrieve the activities.
May be one of the following subclasses of OperationException:

getWorkingAttachments

public Attachment[] getWorkingAttachments(String processId)
                                   throws OperationException
Returns all Attachments locked by this participant in the specified process.

Parameters:
processId - Id of process to check for locked attachments. Cannot be null.
Returns:
array of locked Attachments
Throws:
OperationException - if the session could not retrieve the working attachemnts.
May be one of the following subclasses of OperationException:

addHistories

public void addHistories(InstanceStamp[] instancesStamp)
                  throws OperationException
For Internal use only.

Throws:
OperationException

close

public void close()
Closes the session. For reuse this session you need recreate it.


createPresentation

public Presentation createPresentation(PresentationType presentationType,
                                       String id,
                                       Presentation.Column[] columns)
                                throws ViewOperationException
Creates a Presentation.

Parameters:
presentationType - one of the static PresentationType.
id - presentation id. Cannot be null or contain any of the characters listed in ProcessService.invalidIdCharacters().
columns - array of Presentation.Column listing the columns to display. Cannot be null.
Returns:
new presentation. Note that the presentation has to be stored before it can be retrieved using getPresentation(String).
Throws:
ViewOperationException - if the session could not craete the presentation.
See Also:
ProcessServiceSession.storePresentation(Presentation)

clonePresentation

public Presentation clonePresentation(String id)
                               throws ViewOperationException
Clone an existing Presentation.

Parameters:
id - presentation id. Cannot be null or contain any of the characters listed in ProcessService.invalidIdCharacters().
Returns:
a new cloned presentation.
Throws:
ViewOperationException - if the session could not craete the presentation.

createProcessInstance

public InstanceInfo createProcessInstance(String targetProcessId,
                                          Arguments arguments)
                                   throws OperationException
Creates a new process instance by running the Begin activity with the specified Arguments in the specified Process.

Parameters:
targetProcessId - id of process to create the instance in. If the Id is in the format "/OrganizationalUnit/ProcessName#Variation-Mayor.minor" it will use that specific process, and if the id is in the format "/OrganizationalUnit/ProcessName" (consolidated process id) it will get the active process from this consolidated id.
arguments - arguments defined in the Begin activity of the process specified by targetProcessId. Get the arguments by calling Process.getArgumentSets().
Returns:
Newly created process instance.
Throws:
OperationException - if the session could not create the new instance.
May be one of the following subclasses of OperationException:
See Also:
createProcessInstance(String, String, Arguments), Process.getArgumentSets()

createProcessInstance

public InstanceInfo createProcessInstance(String targetProcessId,
                                          String argumentSetName,
                                          Arguments arguments)
                                   throws OperationException
Creates a new process instance by running the Begin activity with the specified Arguments in the specified Process with the specified argument set name.

Parameters:
targetProcessId - Id of process to create the instance in. If the Id is in the format "/OrganizationalUnit/ProcessName#Variation-Mayor.minor" it will use that specific process, and if the id is in the format "/OrganizationalUnit/ProcessName" (consolidated process id) it will get the active process from this consolidated id.
argumentSetName - name of argument set defined in the Begin activity of the process specified by targetProcessId.
arguments - arguments defined in the Begin activity of the process specified by targetProcessId. Get the arguments by calling Process.getArgumentSets().
Returns:
Newly created process instance.
Throws:
OperationException - if the session could not create the new instance.
May be one of the following subclasses of OperationException:
See Also:
createProcessInstance(String, Arguments), Process.getArgumentSets()

createView

public EditableView createView(ViewType viewType,
                               String viewId,
                               String[] assignedProcesses)
                        throws OperationException
Creates an EditableView.

If the viewType is ViewType.APPLICATIONS, an EditableApplicationsView will be created.
If the viewType is ViewType.ATTACHMENTS, an EditableAttachmentsView will be created.
If the viewType is ViewType.INSTANCES an EditableInstancesView will be created.
If the viewType is not one of the specified ViewTypes, throws a InvalidViewTypeException.

Before calling this method, check that the viewId does not contain any of the characters in ProcessService.invalidIdCharacters().
Note that the created view cannot be retrieved by its viewId until ProcessServiceSession.storeView(View) is called.

Parameters:
viewType - one of the static ViewType.
viewId - view Id. Cannot be null. Check that the view Id does not contain any of the characters in ProcessService.invalidIdCharacters().
assignedProcesses - ids of processes to assign to this view. Cannot be null.
Returns:
EditableView of type EditableApplicationsView, EditableAttachmentsView or EditableInstancesView, depending on the viewType.
Throws:
OperationException - if the session could not create the editable view.
See Also:
ProcessService.invalidIdCharacters(), View.getAssignedProcesses(), ProcessServiceSession.storeView(View)

customRunGlobalActivity

public GlobalExecution customRunGlobalActivity(String activityId,
                                               Arguments arguments)
                                        throws OperationException
Runs a global activity and returns a GlobalExecution to complete the activity.
customRunGlobalActivity can have user interaction, whereas runGlobalActivity cannot.

Ex.

     // Define the arguments of the activity.
     Arguments arguments = Arguments.create();
     argument.putArgument("MyStringArgument", "StringValue");
     argument.putArgument("MyIntegerArgument", 1000);

     // Execute the activity.
     GlobalExecution execution = session.customRunGlobalActivity("/OU/ProcessName/ActivityName", arguments);

     for (Invocation inv = execution.next(); inv != null; inv = execution.next()) {
         execution.setInvocationResult(inv.invoke());
     }

     // Call getArguments() so argument replacement is performed
     execution.getArguments();

     // Get the output arguments
     String myOutputStringArgument = (String) arguments.getArgument("MyOutputStringArgument");
     String result = (String) arguments.getArgument(Arguments.RESULT);

     // Get instance info created
     InstanceInfo instance = execution.getReturnValue();
 

Parameters:
activityId - id of the Global activity. Cannot be null.
Use getGlobalActivities to get an array of Global Activities.
arguments - arguments of the global activity. To get the names of the arguments, call Activity.getTask()[0], then Task.getArguments(), then TaskArgument.isOut() to check that the argument is an output argument. For global creation activities, only output arguments are used.
Returns:
GlobalExecution to continue the execution.
Throws:
OperationException - if the session could not perform the operation.
May be one of the following subclasses of OperationException:
See Also:
getGlobalActivities(String[]), Task.getArguments(), runGlobalActivity(String, Arguments)

hasNewInstances

public boolean hasNewInstances(String viewId)
Returns true if this view has new instances since the last access.

Parameters:
viewId - id of the view to check for new instances.
Returns:
true if this view has new instances.

hasNewInstances

public boolean hasNewInstances()
                        throws OperationException
Returns true if any view has new instances since the last access to it.

Returns:
true if any view has new instances.
Throws:
OperationException - if the session could not perform the operation.

refresh

public void refresh(InstanceInfo instanceInfo)
             throws OperationException
Forces the reload of the specified InstanceInfo.

Parameters:
instanceInfo - InstanceInfo to reload. Cannot be null.
Throws:
OperationException - if the session could not perform the operation.
May be one of the following subclasses of OperationException:

retrieveRoleProperties

public Map retrieveRoleProperties(String roleId,
                                  String category)
                           throws OperationException
Returns a Map with all properties for the specified category for the specified role.

Parameters:
roleId - role to check. Cannot be null.
category - properties category
Returns:
Map with all properties for the specified category for the specified role.
Throws:
OperationException - if the session could not retrieve the properties.

retrieveUserProperties

public Map retrieveUserProperties(String category)
                           throws OperationException
Returns a Map with all participant properties for the specified category.

Parameters:
category - properties category
Returns:
Map with all participant properties for the specified category.
Throws:
OperationException - if the session could not retrieve the properties.

retrieveUserStringProperty

public String retrieveUserStringProperty(String category,
                                         String key)
                                  throws PropertyOperationException
Returns a participant property.

Parameters:
category - properties category
key - roperty key
Returns:
value corresponding to this category and key.
Throws:
PropertyOperationException - if the session could not retrieve the properties.

runGlobalActivity

public InstanceInfo runGlobalActivity(String activityId)
                               throws OperationException
Runs the specified Global Activity with no arguments.

This is the same as runGlobalActivity(activityId, null). The global activity cannot interact with a user; if user interaction is required, use customRunGlobalActivity(String, Arguments).

Parameters:
activityId - Id of the global activity to run. Cannot be null.
Returns:
newly created process instance.
Throws:
OperationException - if the session could not perform the operation.
May be one of the following subclasses of OperationException:

runGlobalActivity

public InstanceInfo runGlobalActivity(String activityId,
                                      Arguments arguments)
                               throws OperationException
Runs the specified Global Activity with the specified arguments

The global activity cannot interact with a user; if user interaction is required, use customRunGlobalActivity(String, Arguments).

Ex.

     // Define the arguments of the activity.
     Arguments arguments = Arguments.create();
     argument.putArgument("MyStringArgument", "StringValue");
     argument.putArgument("MyIntegerArgument", 1000);

     // Execute the activity.
     InstanceInfo instance = session.runGlobalActivity("/OU/ProcessName/ActivityName", arguments);

     // Get the output arguments
     String myOutputStringArgument = (String) arguments.getArgument("MyOutputStringArgument");
     String result = (String) arguments.getArgument(Arguments.RESULT);
 

Parameters:
activityId - Id of the global activity to run. Cannot be null.
arguments - arguments of the global activity. To get the names of the arguments, call Activity.getTask()[0], then Task.getArguments(), then TaskArgument.isOut() to check that the argument is an output argument. For global creation activities, only output arguments are used. In Studio, these are the arguments associated with the CIL (Component Integration Language) method associated with this Global Activity.
Returns:
newly created process instance for a Global Creation activity and null for a Global Activity.
Throws:
OperationException - if the session could not perform the operation.
May be one of the following subclasses of OperationException:

runProcess

public void runProcess(String targetProcessId,
                       String argumentsSetName,
                       Arguments arguments,
                       long timeout)
                throws OperationException
Creates a new process instance in the specified Process and waits for the instance to reach the End activity up to the specified timeout.

If the instance reaches the end before the specified timeout elapses, arguments will contain the output arguments of the process; otherwise this method will throw an InstanceTimeoutException.

The specified process cannot contain any interactive activities.

Note that the current participant must have the same role as the begin activity.

Ex.

     // Select the arguments to pass.
     String argumentsSet = "ArgumentsSet";

     // Define the arguments of the activity.
     Arguments arguments = Arguments.create();
     argument.putArgument("MyStringArgument", "StringValue");
     argument.putArgument("MyIntegerArgument", 1000);

     // Select the time out
     long timeout = 1000L * 60L * 3L; // wait 3 minutes.

     // Execute Process.
     session.runProcess("/OU/ProcessName#Variation-1.0", argumentsSet, arguments, timeout);

     // Get the output arguments
     String myOutputStringArgument = (String) arguments.getArgument("MyOutputStringArgument");
     String result = (String) arguments.getArgument(Arguments.RESULT);
 

Parameters:
targetProcessId - Id of the process for the new process instance. If the Id is in the format "/OrganizationalUnit/ProcessName#Variation-Mayor.minor" it will use that specific process, and if the id is in the format "/OrganizationalUnit/ProcessName" (consolidated process id) it will get the active process from this consolidated id.
argumentsSetName - name of the argument set to use. The default argument set is "BeginIn".
arguments - arguments containing the arguments specified by argumentSetName. Use Arguments.create() to create the arguments.
timeout - how much time to wait for the instance to reach the end activity. a value of zero (0L) means unlimited.
Throws:
OperationException - if the session could not perform the operation.
May be one of the following subclasses of OperationException:

searchParticipantsByName

public Participant[] searchParticipantsByName(String name)
                                       throws OperationException
Returns an array of Participants that match the specified name using a substring search.

Parameters:
name - name to match by substring. Cannot be null.
Returns:
array of Participants that match the specified name
Throws:
OperationException - if the session was unable to retrieve the participants.
May be one of the following subclasses of OperationException:
See Also:
Participant

sendNotification

public void sendNotification(String targetInstanceOrProcessId,
                             String activityName,
                             Arguments notification,
                             String sourceInstanceId)
                      throws OperationException
Deprecated. use sendNotification(String, String, String, Arguments, String) instead

Sends a notification to a process in a parent/child relationship or for an external wait/interruption.

Parameters:
targetInstanceOrProcessId - instance to receive the notification. Cannot be null.
activityName - activity to send the notification from. Cannot be null.
notification - set of arguments to send as notification. Use Process.getArgumentSets(String) with activityName to get the argument sets.
sourceInstanceId - instance sending the notification. Use null for external notifications.
Throws:
OperationException - if the session could not perform the operation.
May be one of the following subclasses of OperationException:

sendNotification

public void sendNotification(String targetInstanceOrProcessId,
                             String activityName,
                             String targetArgumentsSetName,
                             Arguments notification,
                             String sourceInstanceId)
                      throws OperationException
Sends a notification to a process in a parent/child relationship or for an external wait/interruption with the specified argument set.

Parameters:
targetInstanceOrProcessId - instance to receive the notification. Cannot be null.
activityName - activity to send the notification from. Cannot be null.
targetArgumentsSetName - name of the desired target argument set. Use null for the default set.
notification - set of arguments to send as notification. Use Process.getArgumentSets(String) with activityName to get the argument sets.
sourceInstanceId - instance sending the notification. Use null for external notifications.
Throws:
OperationException - if the session could not perform the operation.
May be one of the following subclasses of OperationException:
See Also:
Process.getArgumentSets(String)

sendNotification

public void sendNotification(String targetInstanceOrProcessId,
                             String activityName,
                             Arguments notification)
                      throws OperationException
Deprecated. use sendNotification(String,String,String,Arguments) instead.

Sends a external notification to a process instance. For an external notification only.

Parameters:
targetInstanceOrProcessId - instance to receive the notification. Cannot be null.
activityName - activity to send the notification from. Cannot be null.
notification - set of arguments to send as notification.
Throws:
OperationException

sendNotification

public void sendNotification(String targetInstanceOrProcessId,
                             String activityName,
                             String targetArgumentsSetName,
                             Arguments notification)
                      throws OperationException
Sends a external notification to a process instance. For an external notification only.

Parameters:
targetInstanceOrProcessId - instance to receive the notification. Cannot be null.
activityName - activity to send the notification from. Cannot be null.
targetArgumentsSetName - name of the desired target argument set. Use null for the default set.
notification - set of arguments to send as notification. Use Process.getArgumentSets(String) with activityName to get the argument sets.
Throws:
OperationException - if the session could not perform the operation.
May be one of the following subclasses of OperationException:
See Also:
Process.getArgumentSets(String)

storeUserProperties

public void storeUserProperties(String category,
                                Map properties)
                         throws OperationException
Stores user properties.

Parameters:
category - properties category
properties - a Map with all properties to store (Map.key - property key; Map.value - property value).
Throws:
OperationException - if the session could not store the properties.

updateUserLocale

public void updateUserLocale(Locale locale)
                      throws OperationException
Updates the user locale and stores it.

Parameters:
locale - new participant locale;
Throws:
OperationException - if the session could not perform the operation

updateUserTimeZone

public void updateUserTimeZone(TimeZone timeZone)
                        throws OperationException
Updates the user time zone and stores it.

Parameters:
timeZone - new participant time zone;
Throws:
OperationException - if the session could not perform the operation

getUserLocale

public Locale getUserLocale()
                     throws OperationException
Returns the user Locale.

Returns:
the user locale;
Throws:
OperationException - if the session could not perform the operation

getUserTimeZone

public TimeZone getUserTimeZone()
                         throws OperationException
Returns the user Time Zone.

Returns:
the user time zone;
Throws:
OperationException - if the session could not perform the operation

ALBPM Process API (PAPI)

© Copyright 1996/2005 Fuego Inc. All Rights Reserved