|
ALBPM Process API (PAPI) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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.
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 |
public Activity[] getGlobalActivities(Process[] processes,
int activityType,
boolean hasInstanceAccess)
throws BatchOperationException
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.
BatchOperationException - if the session could not perform the operation over every process.ApplicationsNotAvailableException if not all activities requested
are available.Activity.GLOBAL,
Activity.GLOBAL_AUTOMATIC,
Activity.GLOBAL_CREATION,
Activity.hasInstanceAccess(),
getGlobalActivities(Process[]),
getGlobalActivities(String[]),
getGlobalActivities(String[], int, boolean)
public Activity[] getGlobalActivities(Process[] processes)
throws BatchOperationException
processes - array of processes to check for global activities. Cannot be null.
BatchOperationException - if the session could not perform the operation over every process.ApplicationsNotAvailableException if not all activities requested
are available.ApplicationsNotAvailableInProcessException if the operation
could not be perform on a process.
public Activity[] getGlobalActivities(String[] processIds,
int type,
boolean hasInstanceAccess)
throws BatchOperationException,
OperationException
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.
BatchOperationException - if the session could not perform the operation over every process.ApplicationsNotAvailableException if not all activities requested
are available.ApplicationsNotAvailableInProcessException if the operation
could not be perform on a process.OperationException - if the session could not perform the operation.Activity.GLOBAL,
Activity.GLOBAL_AUTOMATIC,
Activity.GLOBAL_CREATION,
Activity.hasInstanceAccess(),
getGlobalActivities(Process[]),
getGlobalActivities(String[]),
getGlobalActivities(Process[], int, boolean)
public Activity[] getGlobalActivities(String[] processIds)
throws BatchOperationException,
OperationException
processIds - array of processIds to check for global activities. Cannot be null.
OperationException - if the session could not perform the operation.
BatchOperationException - if the session could not perform the operation over every process.ApplicationsNotAvailableException if not all activities requested
are available.ApplicationsNotAvailableInProcessException if the operation
could not be perform on a process.
public boolean instanceHasAttachments(String instanceId)
throws OperationException
true if the specified instance has attachments.
instanceId - Id of the instance to check for attachments. Cannot be null.
true if the specified instance has attachments.
OperationException - if the session could not perform the operation.ProcessNotAvailableException if the process of the instance is not available.InstanceNotFoundException if the instance does not exist.Attachment
public boolean instanceHasNotes(String instanceId)
throws OperationException
true if the specified instance has notes.
instanceId - Id of the instance to check for notes. Cannot be null.
true if the specified instance has notes.
OperationException - if the session could not perform the operation.ProcessNotAvailableException if the process of the instance is not available.InstanceNotFoundException if the instance does not exist.public String getActiveProcessId(String processId)
processId - full process id in the format "/OrganizationalUnit/ProcessName#Variation-Mayor.minor" or
consolidated process Id in the format "/OrganizationalUnit/ProcessName".
Cannot be null.
public String[] getActiveProcessIdsByView(View view)
view - View to check for active processes. Cannot be null.
View.getAssignedProcesses(),
Process.isActive()
public String getActivityDocumentation(String activityId,
Locale locale)
throws OperationException
activityId - Id of the activity that contains the localized documentation. Cannot be null.locale - locale of the localized documentation. Cannot be null.
OperationException - if the session could not perform the operation.ProcessNotAvailableException if the process is not available.ActivityNotFoundException if the activity does not exist.Activity.getDocumentationMap()public Activity getActivityForView(ActivityView view)
view - ActivityView to test.
Activity associated with this ActivityView.Activity.getActivityName()public String[] getAllProcessVersions(String processId)
processId - process Id or consolidated process Id. Cannot be null.
public Activity[] getApplicationsByView(ApplicationsView view)
throws OperationException,
BatchOperationException
view - applications view to check. Cannot be null.
OperationException - if the session could not perform the operation.
BatchOperationException - if the session could not perform the operation over every view.ApplicationsNotAvailableException if not all applications
(activities) requested are available.ApplicationsNotAvailableInProcessException if the
process is not available.View.getAssignedProcesses(),
getGlobalActivities(String[])
public Attachment getAttachment(String attachmentId)
throws OperationException
attachmentId - attachment Id. Cannot be null.
OperationException - if the session was unable to retrieve this attachment.ProcessNotAvailableException if the process is not available.AttachmentNotFoundException if the attachment does not exist.
public Attachment getAttachmentLastVersion(String attachmentId)
throws OperationException
attachmentId - Id of the attachment to test. Cannot be null.
OperationException - if the session was unable to retrieve the last version of the attachment.ProcessNotAvailableException if the process is not available.AttachmentNotFoundException if the attachment does not exist.
public Attachment[] getAttachmentVersions(String attachmentId)
throws OperationException
attachmentId - Id of the attachment to test. Cannot be null.
OperationException - if the session was unable to retrieve the all versions of the attachment.ProcessNotAvailableException if the process is not available.AttachmentNotFoundException if the attachment does not exist.to get the last attachment.,
ProcessServiceSession.checkOutAttachment(Attachment, String),
ProcessServiceSession.checkInAttachment(Attachment, String, java.io.File),
ProcessServiceSession.obtainEditionLock(Attachment)
public Attachment[] getAttachmentsByInstance(String instanceId)
throws OperationException
instanceId - Id of the instance to test. Cannot be null.
OperationException - if the session was unable to retrieve the attachments for the instance.ProcessNotAvailableException if the process is not available.AttachmentNotFoundException if the attachment does not exist.
public Attachment[] getAttachmentsByView(AttachmentsView view)
throws BatchOperationException
view - attachments view. An attachment view is a view of checked-out attachments. Cannot be null.
BatchOperationException - if the session could not perform the operation over every process.AttachmentsNotAvailableException if not all the attachments
requested are available.AttachmentsNotAvailableInProcessException if the operation
could not be perform on a process.
public String[] getBookmarks()
throws OperationException
OperationException - if the session was unable to retrieve the bookmarks.ProcessServiceSession.addBookmarks(InstanceStamp[])public Calendar getCalendar()
public Map getChildrenViews(String viewId)
viewId - Id of View to check for children. Cannot be null.
public Consult getConsult(String instanceId)
throws OperationException
null if there is no consultation.
instanceId - instance Id to check. Cannot be null.
null if there is no Consult.
OperationException - if the session was unable to retrieve the consultations for the instance.ProcessServiceSession.instancesAddConsult(InstanceStamp[], String, String)
public String[] getConsults()
throws OperationException
OperationException - if the session was unable to retrieve the consultations.
public void setDefaultOrderByForViews(String variable,
boolean ascendingOrder)
throws InvalidVariableIdException
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.public Presentation getDefaultPresentation(PresentationType presentationType)
presentationType - one of the static PresentationType. Cannot be null.
Presentation for the specified presentationType.
public EditableView getEditableView(View view)
throws ViewOperationException
view - readable view. Cannot be null.
null.
ViewOperationException - if the session could not get the editable view.ProcessServiceSession.storeView(View)public boolean isExclusive()
false.
public Activity[] getGrabActivitiesForInstance(InstanceInfo instance)
throws OperationException
instance - InstanceInfo to check. Cannot be null.
OperationException - if the session was unable to retrieve the activities.ProcessNotAvailableException if the process is not available.InstanceNotFoundException if the instance does not exist.public String getHost()
public InstanceInfo getInstance(InstanceStamp stamp)
throws OperationException
stamp - InstanceStamp, which contains the instanceId and activityName. Cannot be null.
OperationException - if the session was unable to retrieve the instance.ProcessNotAvailableException if the process is not available.ProcessControlNotAvailableException if the remote process is
not available.InstanceNotFoundException if the instance in this instanceStamp could
not be found.InstanceNotInActivityException if the instance in this instanceStamp
is no longer in the specified Activity.
public InstanceInfo getInstance(String instanceId)
throws OperationException
instanceId - Id of instance to retrieve. Cannot be null.
OperationException - if the session was unable to retrieve the instance.ProcessNotAvailableException if the process is not available.ProcessControlNotAvailableException if the remote process is
not available.InstanceNotFoundException if the instance in this instance Id could
not be found.
public InstanceInfo getInstanceByCorrelation(String processId,
String correlationName,
Object[] correlationValues)
throws OperationException
processId - id of process to check. Cannot be null.correlationName - correlation name. Cannot be null.correlationValues - correlation values.
OperationException - if the session was unable to retrieve the the instance.ProcessNotAvailableException if the process requested is not available.ProcessControlNotAvailableException if the remote process is
not available.InstanceNotFoundException if the instance could not be found.
public DynamicObject getInstanceData(String instanceId)
throws OperationException
instanceId - instance to check. Cannot be null.
OperationException - if the session was unable to retrieve the instance data.ProcessNotAvailableException if the process requested is not available.ProcessControlNotAvailableException if the remote process is
not available.InstanceNotFoundException if the instance could not be found.
public InstanceEvent[] getInstanceEvents(String instanceId)
throws OperationException
instanceId - instance Id to check. Cannot be InstanceEvents for the specified instanceId.
OperationException - if the session was unable to retrieve the instance events.ProcessNotAvailableException if the process requested is not available.ProcessControlNotAvailableException if the remote process is
not available.InstanceNotFoundException if the instance could not be found.
public Note[] getInstanceNotes(String instanceId)
throws OperationException
instanceId - Id of instance to check for notes. Cannot be null.
OperationException - if the session was unable to retrieve the instance notes.ProcessNotAvailableException if the process requested is not available.ProcessControlNotAvailableException if the remote process is
not available.InstanceNotFoundException if the instance could not be found.
public InstanceInfo[] getInstances(String processId)
throws OperationException
processId - process Id. Cannot be null.OperationException - if the session was unable to retrieve the process instances.ProcessNotAvailableException if the process requested is not available.ProcessControlNotAvailableException if the remote process is
not available.
public InstanceInfo[] getInstancesByFilter(String[] processIds,
Filter filter)
throws BatchOperationException
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);
processIds - process Ids. Cannot be null.filter - Filter to restrict and order the instances returned. Cannot be null.
BatchOperationException - if the session could not perform the operation over every process.FilterBatchOperationException if not all instances requested
are available.InstancesNotAvailableInEngineException if the engine where
a process was deployes is not available.ProcessNotAvailableException if a process is not available.
public InstanceInfo[] getInstancesByView(InstancesView view)
throws OperationException,
BatchOperationException
// Gets the view to obtain its instances
InstancesView instancesView = (InstancesView) session.getView("MyInstancesViewId");
// Search instances.
InstanceInfo[] instances = session.getInstancesByView(instancesView);
view - View to retrieve instances from. Cannot be null.
OperationException - if the session was unable to retrieve the process instances.ProcessNotAvailableException if a process in the view is not available.ProcessControlNotAvailableException if the remote process is
not available.BatchOperationException - if the session could not perform the operation over every process.FilterBatchOperationException if not all instances requested
are available.InstancesNotAvailableInEngineException if the engine where
a process was deployes is not available.ProcessNotAvailableException if a process is not available.getViewIds(),
getView(String)
public void setLocale(Locale locale)
throws OperationException
updateUserLocale(Locale) instead.
locale - for receiving messages from PAPI. Cannot be null.
OperationException - if the session was unable to set the new locale.public Locale getLocale()
getUserLocale() instead.
public Note getNote(String noteId)
throws OperationException
noteId - Id of the note to retrieve. Cannot be null.
OperationException - if the session was unable to retrieve the note.ProcessNotAvailableException if the process is not available.ProcessControlNotAvailableException if the remote process is
not available.
public Note[] getNotes(String instanceId)
throws OperationException
getInstanceNotes(java.lang.String) instead
instanceId - Id of the instance to check for notes. Cannot be null.
OperationException - if the session was unable to retrieve the note.ProcessNotAvailableException if the process is not available.ProcessControlNotAvailableException if the remote process is
not available.InstanceNotFoundException if the instance does not exist.
public boolean isOpened()
true if this session is open.close()public String getOrganization()
public View getParentView(View view)
throws OperationException
view - child view. Cannot be null.
null if the specified view does not have a parent.
OperationException - if the session was unable to retrieve the parent view.ViewOperationException if was unable tor retrieve the parent view.public String getParentViewId(String viewId)
getParentView(View) instead.
viewId - Id of the view to check. Cannot be null.
null if not have a parent.public Participant getParticipant()
public Participant getParticipant(String uid)
throws OperationException
uid - Uid of participant. Cannot be null.
OperationException - if the session was unable to retrieve the participant.ParticipantException if was unable to retrieve the participant.ParticipantNotFoundException if the participant does not exit.public Presentation getPresentation(String presentationId)
presentationId - Presentation Id. Cannot be null.
public Presentation getPresentation(PresentationType presentationType,
String presentationId)
throws OperationException
presentationType - one of the static PresentationTypes. Cannot be null.presentationId - Id of presentation to retrieve. Cannot be null.
OperationException - if the session was unable to retrieve the presentation.PresentationNotFoundException if the presentation does not exist.
public String[] getPresentationIds(PresentationType presentationType)
throws OperationException
presentationType - one of the static PresentationTypes. Cannot be null.
OperationException - if the session was unable to retrieve the presentations.public Process getProcess(int processIn)
processIn - process identification number.
public Process getProcess(String processId)
throws OperationException
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.
OperationException - if the session was unable to retrieve the process.ProcessNotAvailableException if the process is not available.
public ProcessDiagram getProcessDiagram(String processId)
throws OperationException
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.
OperationException - if the session was unable to retrieve the process diagram.ProcessNotAvailableException if the process is not available.
public ProcessDiagram getProcessDiagram(int processIn)
throws OperationException
processIn - process identification number.
OperationException - if the session was unable to retrieve the process diagram.ProcessNotAvailableException if the process is not available.
public ProcessDiagram getProcessDiagram(Process process)
throws OperationException
process - Process. Cannot be null.
OperationException - if the session was unable to retrieve the process diagram.ProcessNotAvailableException if the process is not available.
public String getProcessDocumentation(String processId,
Locale locale)
throws OperationException
processId - Id of the process to check. Cannot be null.locale - of the requested documentation. Cannot be null.
null if there is no documentation
for the specified locale.
OperationException - if the session could not perform the operation.ProcessNotAvailableException if the process is not available.public String getProcessId(InstanceInfo instance)
instance - InstanceInfo to check. Cannot be null.
public String getProcessId(int processIn)
throws ProcessNotAvailableException
processIn - process identification number
ProcessNotAvailableException - if the process is not available.public String[] getProcessIds()
public String[] getProcessIds(boolean onlyActiveProcess)
onlyActiveProcess - if true, then only active processes. If false, then active
and deprecated processes.
public String getProcessImage(String processId)
processId - Id of the process for this process image
public int getProcessIn(String processId)
throws ProcessNotAvailableException
processId - process Id. Cannot be null.
ProcessNotAvailableException - if the process is not available.
public Process[] getProcesses(boolean force)
throws BatchOperationException
force - true to return all processes. And false to return only loaded process
and do not throw exceptions if the load process failed.
BatchOperationException - if not all deployed processes are available.ProcessesNotAvailableException if not all processes available.ProcessNotAvailableException if a process is not available.
public Process[] getProcesses(boolean onlyActiveProcess,
boolean force)
throws BatchOperationException
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.
BatchOperationException - if not all deployed processes are available.ProcessesNotAvailableException if not all processes available.ProcessNotAvailableException if a process is not available.public Map getSecureEngines()
public void setTimeZone(TimeZone timezone)
updateUserTimeZone(java.util.TimeZone) instead.
timezone - new TimeZone.public TimeZone getTimeZone()
getUserTimeZone() instead.
public VarDefinition getVar(String variableId)
variableId - Id of VarDefinition associated with a Process.
null if there is no matching VarDefinition.public VarDefinition[] getVars()
public View getView(String viewId)
throws OperationException
viewId - view Id. Cannot be null. To retrieve the default inbox view, use View.INBOX_DEFAULT_ID
OperationException - if the session could not retreive the view.ViewNotFoundException if the view does not exist.
public String[] getViewIds()
throws OperationException,
BatchOperationException
OperationException - if the session could not perform the operation.
BatchOperationException - if the session could not retrieve all view ids.
public String[] getVisibleActivities(String processId)
throws OperationException
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.
OperationException - if the session could not retrieve the activities.ProcessNotAvailableException if the process is not available.ProcessControlNotAvailableException if the remote process is
not available.
public Attachment[] getWorkingAttachments(String processId)
throws OperationException
processId - Id of process to check for locked attachments. Cannot be null.
OperationException - if the session could not retrieve the working attachemnts.ProcessNotAvailableException if the process is not available.ProcessControlNotAvailableException if the remote process is
not available.
public void addHistories(InstanceStamp[] instancesStamp)
throws OperationException
OperationExceptionpublic void close()
public Presentation createPresentation(PresentationType presentationType,
String id,
Presentation.Column[] columns)
throws ViewOperationException
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.
getPresentation(String).
ViewOperationException - if the session could not craete the presentation.ProcessServiceSession.storePresentation(Presentation)
public Presentation clonePresentation(String id)
throws ViewOperationException
id - presentation id. Cannot be null or contain any of the characters listed
in ProcessService.invalidIdCharacters().
ViewOperationException - if the session could not craete the presentation.
public InstanceInfo createProcessInstance(String targetProcessId,
Arguments arguments)
throws OperationException
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().
OperationException - if the session could not create the new instance.ProcessNotAvailableException if the process is not available.ProcessControlNotAvailableException if the remote process is
not available.ParticipantNotInRoleException if the participant does not have
roles in the process.NoPermissionException if the participant does not have the
execution permission.ProcessOperationException if the execution fails.createProcessInstance(String, String, Arguments),
Process.getArgumentSets()
public InstanceInfo createProcessInstance(String targetProcessId,
String argumentSetName,
Arguments arguments)
throws OperationException
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().
OperationException - if the session could not create the new instance.ProcessNotAvailableException if the process is not available.ProcessControlNotAvailableException if the remote process is
not available.ParticipantNotInRoleException if the participant does not have
roles in the process.NoPermissionException if the participant does not have the
execution permission.ProcessOperationException if the execution fails.createProcessInstance(String, Arguments),
Process.getArgumentSets()
public EditableView createView(ViewType viewType,
String viewId,
String[] assignedProcesses)
throws OperationException
ProcessService.invalidIdCharacters().ProcessServiceSession.storeView(View)
is called.
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.
OperationException - if the session could not create the editable view.ProcessService.invalidIdCharacters(),
View.getAssignedProcesses(),
ProcessServiceSession.storeView(View)
public GlobalExecution customRunGlobalActivity(String activityId,
Arguments arguments)
throws OperationException
// 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();
activityId - id of the Global activity. 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.
OperationException - if the session could not perform the operation.ProcessNotAvailableException if the process is not available.ProcessControlNotAvailableException if the remote process is
not available.ActivityNotFoundException if the activity does not existParticipantNotInRoleException if the participant does not have
roles of the activity.NoPermissionException if the participant does not have the
execution permission.ProcessOperationException if the execution fails.getGlobalActivities(String[]),
Task.getArguments(),
runGlobalActivity(String, Arguments)public boolean hasNewInstances(String viewId)
viewId - id of the view to check for new instances.
true if this view has new instances.
public boolean hasNewInstances()
throws OperationException
true if any view has new instances.
OperationException - if the session could not perform the operation.
public void refresh(InstanceInfo instanceInfo)
throws OperationException
instanceInfo - InstanceInfo to reload. Cannot be null.
OperationException - if the session could not perform the operation.ProcessNotAvailableException if the process is not available.ProcessControlNotAvailableException if the remote process is
not available.InstanceNotFoundException if the instance does not exist.
public Map retrieveRoleProperties(String roleId,
String category)
throws OperationException
roleId - role to check. Cannot be null.category - properties category
OperationException - if the session could not retrieve the properties.
public Map retrieveUserProperties(String category)
throws OperationException
category - properties category
OperationException - if the session could not retrieve the properties.
public String retrieveUserStringProperty(String category,
String key)
throws PropertyOperationException
category - properties categorykey - roperty key
PropertyOperationException - if the session could not retrieve the properties.
public InstanceInfo runGlobalActivity(String activityId)
throws OperationException
customRunGlobalActivity(String, Arguments).
activityId - Id of the global activity to run. Cannot be null.
OperationException - if the session could not perform the operation.ProcessNotAvailableException if the process is not available.ProcessControlNotAvailableException if the remote process is
not available.ActivityNotFoundException if the activity does not existParticipantNotInRoleException if the participant does not have
roles of the activity.NoPermissionException if the participant does not have the
execution permission.ProcessOperationException if the execution fails.
public InstanceInfo runGlobalActivity(String activityId,
Arguments arguments)
throws OperationException
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);
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.
null for a Global Activity.
OperationException - if the session could not perform the operation.ProcessNotAvailableException if the process is not available.ProcessControlNotAvailableException if the remote process is
not available.ActivityNotFoundException if the activity does not existParticipantNotInRoleException if the participant does not have
roles of the activity.NoPermissionException if the participant does not have the
execution permission.ProcessOperationException if the execution fails.
public void runProcess(String targetProcessId,
String argumentsSetName,
Arguments arguments,
long timeout)
throws OperationException
// 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);
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.
OperationException - if the session could not perform the operation.InstanceTimeoutException if the specified timeout elapses before the
instance reaches the end.InstanceAbortedException if the output arguments are null.
public Participant[] searchParticipantsByName(String name)
throws OperationException
name - name to match by substring. Cannot be null.
OperationException - if the session was unable to retrieve the participants.ParticipantException if was unable to retrieve the participants.Participant
public void sendNotification(String targetInstanceOrProcessId,
String activityName,
Arguments notification,
String sourceInstanceId)
throws OperationException
sendNotification(String, String, String, Arguments, String) instead
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.
OperationException - if the session could not perform the operation.ProcessNotAvailableException if the process is not available.ProcessControlNotAvailableException if the remote process is
not available.ActivityNotFoundException if the activity does not existProcessOperationException if the execution fails.
public void sendNotification(String targetInstanceOrProcessId,
String activityName,
String targetArgumentsSetName,
Arguments notification,
String sourceInstanceId)
throws OperationException
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.
OperationException - if the session could not perform the operation.ProcessNotAvailableException if the process is not available.ProcessControlNotAvailableException if the remote process is
not available.ActivityNotFoundException if the activity does not existProcessOperationException if the execution fails.Process.getArgumentSets(String)
public void sendNotification(String targetInstanceOrProcessId,
String activityName,
Arguments notification)
throws OperationException
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.
OperationException
public void sendNotification(String targetInstanceOrProcessId,
String activityName,
String targetArgumentsSetName,
Arguments notification)
throws OperationException
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.
OperationException - if the session could not perform the operation.ProcessNotAvailableException if the process is not available.ProcessControlNotAvailableException if the remote process is
not available.ActivityNotFoundException if the activity does not existProcessOperationException if the execution fails.Process.getArgumentSets(String)
public void storeUserProperties(String category,
Map properties)
throws OperationException
category - properties categoryproperties - a Map with all properties to store (Map.key - property key; Map.value - property value).
OperationException - if the session could not store the properties.
public void updateUserLocale(Locale locale)
throws OperationException
locale - new participant locale;
OperationException - if the session could not perform the operation
public void updateUserTimeZone(TimeZone timeZone)
throws OperationException
timeZone - new participant time zone;
OperationException - if the session could not perform the operation
public Locale getUserLocale()
throws OperationException
OperationException - if the session could not perform the operation
public TimeZone getUserTimeZone()
throws OperationException
OperationException - if the session could not perform the operation
|
ALBPM Process API (PAPI) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||