Fuego Process API

fuego.papi
Interface ProcessServiceNESession

All Superinterfaces:
Serializable
All Known Subinterfaces:
ProcessServiceSession

public interface ProcessServiceNESession
extends Serializable


Method Summary
 void addHistories(InstanceStamp[] instancesStamp)
           
 void close()
          This method close all connection with the directory and remove all reference with the engines and the processes.
 Presentation createPresentation(PresentationType presentationType, String id, Presentation.Column[] columns)
           
 InstanceInfo createProcessInstance(String targetProcessId, Arguments arguments)
          Creates a new process instance in a particular process or in the active process if you use the consolidated process identification.
 InstanceInfo createProcessInstance(String targetProcessId, String argumentsSetName, Arguments arguments)
          Creates a new process instance in a particular process or in the active process if you use the consolidated process identification.
 EditableView createView(ViewType viewType, String viewId, String[] assignedProcesses)
          To create a view.
 GlobalExecution customRunGlobalActivity(String activityId, Arguments arguments)
          Runs a global activity, if it is a global creation activity, it returns a GlobalExecution representing this execution.
 String getActiveProcessId(String process)
          Return the active process identification for the specific process.
 String[] getActiveProcessIdsByView(View view)
          Returns the ids of the processed that are active (non deprecated) in the given View.
 String getActivityDocumentation(String activityId, Locale locale)
          Returns the local path of the HTML documentation for the given activity.
 Activity getActivityForView(ActivityView view)
          Return the activity of the specific view
 String[] getAllProcessVersions(String process)
          Return all process identifications for the specific process.
 Activity[] getApplicationsByView(ApplicationsView view)
          Returns all the Global Activities for a given ApplicationsView
 Attachment getAttachment(String attachmentId)
          Returns the attachment specified by instId(instId), attachmentId, and version
 Attachment getAttachmentLastVersion(String attachmentId)
          Returns the last version of an attachment specified by instId (instId) and attachmentId
 Attachment[] getAttachmentsByInstance(String instanceId)
          This method returns an array with all the attachments related with the passed instance.
 Attachment[] getAttachmentsByView(AttachmentsView view)
          Returns all the working attachments for a view for the participant when something wrong occurs
 Attachment[] getAttachmentVersions(String attachmentId)
          This method returns an array with all the versions for a given attachment.
 String[] getBookmarks()
           
 Calendar getCalendar()
          Returns the calendar of this session
 Map getChildrenViews(String viewId)
          Returns the children views of the view id
 Consult getConsult(String instanceId)
          Return a Consult over a specific instance identification.
 String[] getConsults()
           
 Presentation getDefaultPresentation(PresentationType presentationType)
           
 Presentation getDefaultPresentation(ViewType viewType)
           
 EditableView getEditableView(View view)
          Return an editable view for the specific view.
 Activity[] getGlobalActivities(Process[] processes)
          Returns all the Global Activities.
 Activity[] getGlobalActivities(Process[] processes, int type, boolean hasInstanceAccess)
          Returns all the Global Activities for a given type
 Activity[] getGlobalActivities(String[] processIds)
          Returns all the Global Activities
 Activity[] getGlobalActivities(String[] processIds, int type, boolean hasInstanceAccess)
          Returns all the Global Activities for a given type
 Activity[] getGrabActivitiesForInstance(InstanceInfo instance)
          Return all grab activities where the instances can be grabbed
 String getHost()
          Returns the host where the owner of this session is connected from.
 InstanceInfo getInstance(InstanceStamp stamp)
          Returns an InstanceInfo object representing a process instance specified with the given instanceId in the given activity.
 InstanceInfo getInstance(String instanceId)
          Returns an InstanceInfo object representing a process instance specified with the given instanceId note: Be aware that this info could be outdated at any time, so...
 InstanceInfo getInstanceByCorrelation(String processId, String correlationName, Object[] correlationValues)
          Returns an InstanceInfo object representing a process instance found by using specified correlation name and values.
 fuego.lang.DynamicObject getInstanceData(String instanceId)
          Returns the process instance data associated with the instanceId
 InstanceEvent[] getInstanceEvents(String instanceId)
          Returns a process instance event in the specific instance Id.
 Note[] getInstanceNotes(String instanceId)
          Returns all notes attached over the instance id specified.
 InstanceInfo[] getInstances(String processId)
          Returns all process instance in the specific process or for all versions of the process if you use the consolidated process identification.
 InstanceInfo[] getInstancesByFilter(String[] processIds, Filter filter)
          Returns all the instances found using the given Filter in each Process.
 InstanceInfo[] getInstancesByView(InstancesView view)
          Returns instances included in the passed view.
 Locale getLocale()
          Returns the locale of this session
 Note getNote(String noteId)
          This method returns the Note for teh given noteId.
 Note[] getNotes(String instanceId)
          Deprecated. use getInstanceNotes(java.lang.String) instead
 String getOrganization()
          Returns the organization name.
 View getParentView(View view)
          Returns the parent view of the specific view
 String getParentViewId(String viewId)
          Deprecated.  
 Participant getParticipant()
          Returns de participant for this session.
 Participant getParticipant(String uid)
          Returns a Participant from the Directory service
 Presentation getPresentation(PresentationType presentationType, String presentationId)
          Returns the Presentation of the specific View Type
 Presentation getPresentation(String presentationId)
           
 Presentation getPresentation(ViewType viewType, String presentationId)
           
 String[] getPresentationIds(PresentationType presentationType)
          Returns the Presentation of the specific View Name
 Process getProcess(int processIn)
          Return the fuego.papi.Process for the specific process identification number.
 Process getProcess(String processId)
          Returns a Process object for the specified process identification or for the active process if you use the consolidated process id.
 ProcessDiagram getProcessDiagram(int processIn)
          Returns a Process Diagram object for the specified process identification number.
 ProcessDiagram getProcessDiagram(Process process)
          Returns a Process Diagram object for the specified process.
 ProcessDiagram getProcessDiagram(String processId)
          Returns a Process Diagram object for the specified process identification or for the active process if you use the consolidated process id.
 String getProcessDocumentation(String processId, Locale locale)
          Returns the local path of the HTML documentation for the given process.
 Process[] getProcesses(boolean force)
          Returns all deployed processes
 Process[] getProcesses(boolean onlyActiveProcess, boolean force)
          Returns all deployed processes
 String getProcessId(InstanceInfo instance)
          Returns the ProcessId for this instance.
 String getProcessId(int processIn)
           
 String[] getProcessIds()
          Returns all ids deployed processes for this session
 String[] getProcessIds(boolean onlyActiveProcess)
          Returns all ids deployed processes for this session
If onlyActiveProcess is true, then the ids returned only active processes, if onlyActiveProcess is false, then the ids returned all processes, active and deprecated.
 String getProcessImage(String processId)
          Returns the process designer image in XML format.
 int getProcessIn(String processId)
           
 Map getSecureEngines()
           
 TimeZone getTimeZone()
          Returns the timezone of this session
 VarDefinition getVar(String variableId)
          Returns a specific variable definition from all the processes this session have.
 VarDefinition[] getVars()
          Returns all the variable definitions from all the processes this session have.
 View getView(String viewId)
          Returns the view of the specific View Id
 String[] getViewIds()
          Returns an array with the Ids of views for the current participant.
 String[] getVisibleActivities(String processId)
          Returns all the visible activities for this participant in given process identification or for all versions of the consolidated process identification.
 Attachment[] getWorkingAttachments(String processId)
          Returns all attachments currently locked by the current user in the given processes
 boolean hasNewInstances()
          Return if the visible views (not hidden views) of this session contains new instances or not.
 boolean hasNewInstances(String viewId)
          Return if the views contains new instances or not.
 boolean instanceHasAttachments(String instanceId)
          Return if the instance contains attachments or not.
 boolean instanceHasNotes(String instanceId)
          Return if the instance contains notes or not.
 boolean isExclusive()
          Returns if this session is exlusive or not.
 boolean isOpened()
          Asks if this session is open or not.
 void refresh(InstanceInfo instanceInfo)
          Forces the reload of the given instance info
 Map retrieveRoleProperties(String roleId, String category)
          Return a java.util.Map with all properties of the role for the specific category
 Map retrieveUserProperties(String category)
          Returns user directory properties
 String retrieveUserStringProperty(String category, String key)
          Returns a string user directory property
 InstanceInfo runGlobalActivity(String activityId)
          Runs a global activity, if it is a global creation activity, it returns a process instance, null otherwise.
 InstanceInfo runGlobalActivity(String activityId, Arguments arguments)
          Runs a global activity, if it is a global creation activity, it returns a process instance, null otherwise.
 void runProcess(String targetProcessId, String argumentsSetName, Arguments arguments, long timeout)
          Creates a new process instance in a particular process or in the active process if you use the consolidated process identification, and waits for the instance to reach the End activity up to a specified timeout.
 Participant[] searchParticipantsByName(String name)
          Returns an array with all the Participants that match the given name.
 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 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
 void setDefaultOrderByForViews(String variable, boolean ascendingOrder)
          Set the default order by for the views if the view doesn't have the order by This method only accept default instances variables.
 void setLocale(Locale locale)
          Sets the locale in order to receive all messages from PAPI with this locale param locale The new locale.
 void setTimeZone(TimeZone timezone)
          Sets the timezon in order to handle dates.
 void storeUserProperties(String category, Map properties)
           
 

Method Detail

getGlobalActivities

public Activity[] getGlobalActivities(Process[] processes,
                                      int type,
                                      boolean hasInstanceAccess)
                               throws BatchOperationException
Returns all the Global Activities for a given type

Parameters:
processes - Array of processes where to search activities.
type - Activity type
hasInstanceAccess - If this Global Activity is asociated to an instance.
Returns:
Throws:
BatchOperationException

getGlobalActivities

public Activity[] getGlobalActivities(Process[] processes)
                               throws BatchOperationException
Returns all the Global Activities.

Parameters:
processes - Array of processes where to search activities.
Returns:
Throws:
BatchOperationException

getGlobalActivities

public Activity[] getGlobalActivities(String[] processIds,
                                      int type,
                                      boolean hasInstanceAccess)
                               throws BatchOperationException,
                                      OperationException
Returns all the Global Activities for a given type

Parameters:
processIds - Array of process ids where to search activities.
type - Activity type
hasInstanceAccess - If this Global Activity is asociated to an instance.
Returns:
Throws:
BatchOperationException
OperationException

getGlobalActivities

public Activity[] getGlobalActivities(String[] processIds)
                               throws BatchOperationException,
                                      OperationException
Returns all the Global Activities

Parameters:
processIds - Array of process ids where to search activities.
Returns:
Throws:
BatchOperationException
OperationException

instanceHasAttachments

public boolean instanceHasAttachments(String instanceId)
                               throws OperationException
Return if the instance contains attachments or not.

Returns:
true if the instance contains attachments and false if not.
Throws:
OperationException - Throw this exception when the session could not optain the instance.

instanceHasNotes

public boolean instanceHasNotes(String instanceId)
                         throws OperationException
Return if the instance contains notes or not.

Returns:
true if the instance contains notes and false if not.
Throws:
OperationException - Throw this exception when the session could not optain the instance.

getActiveProcessId

public String getActiveProcessId(String process)
Return the active process identification for the specific process.

Parameters:
process - Process identification or consolidated process identification to obtain the active process identification.
Returns:
Active process identification

getActiveProcessIdsByView

public String[] getActiveProcessIdsByView(View view)
Returns the ids of the processed that are active (non deprecated) in the given View.


getActivityDocumentation

public String getActivityDocumentation(String activityId,
                                       Locale locale)
                                throws OperationException
Returns the local path of the HTML documentation for the given activity. The activity documentation is retrieved from the engine and stored in the path indicated, along with the images used by the documentation. The HTML file is always stored using UTF-8 encoding.

Parameters:
activityId - The id of the activity
locale - The locale for the documentation
Returns:
String The local path of the HTML documentation for the given activity, or null if the activity has no documentation.
Throws:
OperationException - if a problem occured while getting the process information.
ProcessNotAvailableException - is the process referenced by activityID is not valid.

getActivityForView

public Activity getActivityForView(ActivityView view)
Return the activity of the specific view

Parameters:
view - View to obtain the activity
Returns:
Activity of the view

getAllProcessVersions

public String[] getAllProcessVersions(String process)
Return all process identifications for the specific process.

Parameters:
process - Process identification or consolidated process identification to obtain versions.
Returns:
All process identification

getApplicationsByView

public Activity[] getApplicationsByView(ApplicationsView view)
                                 throws OperationException,
                                        BatchOperationException
Returns all the Global Activities for a given ApplicationsView

Throws:
OperationException
BatchOperationException

getAttachment

public Attachment getAttachment(String attachmentId)
                         throws OperationException
Returns the attachment specified by instId(instId), attachmentId, and version

Parameters:
attachmentId - The desired attachment id
Returns:
An attachment
Throws:
ParticipantException
ProcessOperationException
AttachmentOperationException
OperationException

getAttachmentLastVersion

public Attachment getAttachmentLastVersion(String attachmentId)
                                    throws OperationException
Returns the last version of an attachment specified by instId (instId) and attachmentId

Parameters:
attachmentId - The desired attachment id
Returns:
An attachment
Throws:
AttachmentOperationException
ParticipantException
ProcessOperationException
OperationException

getAttachmentVersions

public Attachment[] getAttachmentVersions(String attachmentId)
                                   throws OperationException
This method returns an array with all the versions for a given attachment.

Parameters:
attachmentId - The identificator of the attachment where to gather all the versions.
Throws:
OperationException

getAttachmentsByInstance

public Attachment[] getAttachmentsByInstance(String instanceId)
                                      throws OperationException
This method returns an array with all the attachments related with the passed instance.

Parameters:
instanceId - The identificator of the instance where to gather all the attachments
Throws:
OperationException

getAttachmentsByView

public Attachment[] getAttachmentsByView(AttachmentsView view)
                                  throws BatchOperationException
Returns all the working attachments for a view for the participant when something wrong occurs

Parameters:
view -
Returns:
attachments array
Throws:
BatchOperationException - when some attachment was not obtained.

getBookmarks

public String[] getBookmarks()
                      throws OperationException
Throws:
OperationException

getCalendar

public Calendar getCalendar()
Returns the calendar of this session


getChildrenViews

public Map getChildrenViews(String viewId)
Returns the children views of the view id

Returns:
Map with children views or null if not have children

getConsult

public Consult getConsult(String instanceId)
                   throws OperationException
Return a Consult over a specific instance identification.

Parameters:
instanceId - Instance Identification
Returns:
Throws:
OperationException

getConsults

public String[] getConsults()
                     throws OperationException
Throws:
OperationException

setDefaultOrderByForViews

public void setDefaultOrderByForViews(String variable,
                                      boolean ascendingOrder)
                               throws InvalidVariableIdException
Set the default order by for the views if the view doesn't have the order by This method only accept default instances variables.

Parameters:
variable -
ascendingOrder -
Throws:
InvalidVariableIdException

getDefaultPresentation

public Presentation getDefaultPresentation(PresentationType presentationType)

getDefaultPresentation

public Presentation getDefaultPresentation(ViewType viewType)

getEditableView

public EditableView getEditableView(View view)
                             throws ViewOperationException
Return an editable view for the specific view.

Parameters:
view - View to obtain an editable view.
Returns:
Return the editable view only if the view not is read only and if the view is read only return null.
Throws:
ViewOperationException

isExclusive

public boolean isExclusive()
Returns if this session is exlusive or not.


getGrabActivitiesForInstance

public Activity[] getGrabActivitiesForInstance(InstanceInfo instance)
                                        throws OperationException
Return all grab activities where the instances can be grabbed

Parameters:
instance - InstanceInfo to obtain the grab activities
Returns:
Throws:
OperationException

getHost

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


getInstance

public InstanceInfo getInstance(InstanceStamp stamp)
                         throws OperationException
Returns an InstanceInfo object representing a process instance specified with the given instanceId in the given activity. (This information is inside the InstanceStamp). note: Be aware that this info could be outdated at any time, so... if you want to have an updated instance status, make a getInstance() call again instead of asking to the info object you obtained in your previous getInstance() call"

Parameters:
stamp - The instance id and the activity where it is supose to be.
Returns:
InstanceInfo The desired instanceInfo.
Throws:
InstanceNotInActivityException - If the instance is no longer in the activity passed in the stamp.
ProcessOperationException
ParticipantException
OperationException

getInstance

public InstanceInfo getInstance(String instanceId)
                         throws OperationException
Returns an InstanceInfo object representing a process instance specified with the given instanceId note: Be aware that this info could be outdated at any time, so... if you want to have an updated instance status, make a getInstance() call again instead of asking to the info object you obtained in your previous getInstance() call"

Parameters:
instanceId - The instance id of the required process instance
Returns:
Throws:
ProcessOperationException
ParticipantException
OperationException

getInstanceByCorrelation

public InstanceInfo getInstanceByCorrelation(String processId,
                                             String correlationName,
                                             Object[] correlationValues)
                                      throws OperationException
Returns an InstanceInfo object representing a process instance found by using specified correlation name and values. note: Be aware that this info could be outdated at any time, so... if you want to have an updated instance status, make a getInstance() call again instead of asking to the info object you obtained in your previous getInstance() call"

Parameters:
processId - The instance id of the required process instance
correlationName - Name of the correlation
correlationValues - Values used to find the instance
Returns:
Throws:
ProcessOperationException
ParticipantException
OperationException

getInstanceData

public fuego.lang.DynamicObject getInstanceData(String instanceId)
                                         throws OperationException
Returns the process instance data associated with the instanceId

Parameters:
instanceId -
Returns:
Throws:
ProcessOperationException
OperationException

getInstanceEvents

public InstanceEvent[] getInstanceEvents(String instanceId)
                                  throws OperationException
Returns a process instance event in the specific instance Id.

Parameters:
instanceId -
Returns:
Throws:
ProcessOperationException
OperationException

getInstanceNotes

public Note[] getInstanceNotes(String instanceId)
                        throws OperationException
Returns all notes attached over the instance id specified.

Parameters:
instanceId -
Throws:
ProcessOperationException
OperationException

getInstances

public InstanceInfo[] getInstances(String processId)
                            throws OperationException
Returns all process instance in the specific process or for all versions of the process if you use the consolidated process identification. note: Be aware that this info could be outdated at any time, so... if you want to have an updated instances status, make a getInstances() call again instead of asking to the info objects you obtained in your previous getInstances() call"

Parameters:
processId - Process identification or consolidated process identification if you want the instances of all versions of the process.
Returns:
An array with all the instances in this process.
Throws:
ProcessNotAvailableException
ProcessOperationException
OperationException

getInstancesByFilter

public InstanceInfo[] getInstancesByFilter(String[] processIds,
                                           Filter filter)
                                    throws BatchOperationException
Returns all the instances found using the given Filter in each Process. note: Be aware that this info could be outdated at any time, so... if you want to have an updated instances status, make a getInstancesByFilter() call again instead of asking to the info objects you obtained in your previous getInstancesByFilter() call"

Parameters:
processIds - The ids of the processes where to search for instances.
filter - The filter to use in order to search for instances.
Returns:
InstanceInfo[] An array containig all the instances found in all the processes, if no instances were found an empty InstanceInfo array will be returned.
Throws:
BatchOperationException

getInstancesByView

public InstanceInfo[] getInstancesByView(InstancesView view)
                                  throws OperationException,
                                         BatchOperationException
Returns instances included in the passed view. note: Be aware that this info could be outdated at any time, so... if you want to have an updated instances status, make a getInstancesByView() call again instead of asking to the info objects you obtained in your previous getInstancesByView() call"

Parameters:
view -
Returns:
instances for the given view
Throws:
DeprecatedViewException
BatchOperationException
OperationException

setLocale

public void setLocale(Locale locale)
               throws OperationException
Sets the locale in order to receive all messages from PAPI with this locale param locale The new locale.

Throws:
OperationException

getLocale

public Locale getLocale()
Returns the locale of this session


getNote

public Note getNote(String noteId)
             throws OperationException
This method returns the Note for teh given noteId.

Parameters:
noteId - The identificator of the note to be retrieved.
Returns:
Note The Note for the given noteId
Throws:
OperationException

getNotes

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

Returns all notes attached over the instance id specified.

Parameters:
instanceId -
Throws:
OperationException

isOpened

public boolean isOpened()
Asks if this session is open or not.


getOrganization

public String getOrganization()
Returns the organization name.

Returns:
organization name.

getParentView

public View getParentView(View view)
                   throws OperationException
Returns the parent view of the specific view

Parameters:
view - View to obtein the parent view
Returns:
Return the parent view or null if not have a parent.
Throws:
OperationException

getParentViewId

public String getParentViewId(String viewId)
Deprecated.  

Returns the parent view id of the specific view id

Parameters:
viewId - View id to obtein the parent view id
Returns:
Return the parent view id or null if not have a parent

getParticipant

public Participant getParticipant()
Returns de participant for this session.

Returns:
participant of the session

getParticipant

public Participant getParticipant(String uid)
                           throws OperationException
Returns a Participant from the Directory service

Throws:
ParticipantException
OperationException

getPresentation

public Presentation getPresentation(String presentationId)

getPresentation

public Presentation getPresentation(PresentationType presentationType,
                                    String presentationId)
                             throws OperationException
Returns the Presentation of the specific View Type

Parameters:
presentationType - to look for presentations of the same PresentationType
presentationId - Id of presentation
Returns:
Throws:
ViewOperationException
OperationException

getPresentation

public Presentation getPresentation(ViewType viewType,
                                    String presentationId)
                             throws OperationException
Throws:
OperationException

getPresentationIds

public String[] getPresentationIds(PresentationType presentationType)
                            throws OperationException
Returns the Presentation of the specific View Name

Parameters:
presentationType - to look for presentations of the same viewType
Returns:
String array with the presentations identifications.
Throws:
OperationException

getProcess

public Process getProcess(int processIn)
Return the fuego.papi.Process for the specific process identification number.

Parameters:
processIn - Process identification number
Returns:
fuego.papi.Process for this process identification number

getProcess

public Process getProcess(String processId)
                   throws OperationException
Returns a Process object for the specified process identification or for the active process if you use the consolidated process id.

Parameters:
processId - Process identification or Consolidated process identification for the active process. Note: It must not be a null value.
Returns:
a Process object
Throws:
ProcessNotAvailableException - the process can't be reached
NullPointerException - if processId is null.
OperationException
See Also:
Process

getProcessDiagram

public ProcessDiagram getProcessDiagram(String processId)
                                 throws OperationException
Returns a Process Diagram object for the specified process identification or for the active process if you use the consolidated process id.

Parameters:
processId - Process identification or Consolidated process identification for the active process. Note: It must not be a null value.
Returns:
a Process Diagram object
Throws:
ProcessNotAvailableException - the process can't be reached
NullPointerException - if processId is null.
OperationException
See Also:
ProcessDiagram

getProcessDiagram

public ProcessDiagram getProcessDiagram(int processIn)
                                 throws OperationException
Returns a Process Diagram object for the specified process identification number.

Parameters:
processIn - Process identification number.
Returns:
a Process Diagram object
Throws:
ProcessNotAvailableException - the process can't be reached
NullPointerException - if processId is null.
OperationException
See Also:
ProcessDiagram

getProcessDiagram

public ProcessDiagram getProcessDiagram(Process process)
                                 throws OperationException
Returns a Process Diagram object for the specified process.

Parameters:
process - Process.
Returns:
a Process Diagram object
Throws:
ProcessNotAvailableException - the process can't be reached
NullPointerException - if processId is null.
OperationException
See Also:
ProcessDiagram

getProcessDocumentation

public String getProcessDocumentation(String processId,
                                      Locale locale)
                               throws OperationException
Returns the local path of the HTML documentation for the given process. The process documentation is retrieved from the engine and stored in the path indicated, along with the images used by the documentation. The HTML file is always stored using UTF-8 encoding.

Parameters:
processId - The id of the process
locale - The locale for the documentation
Returns:
String The local path of the HTML documentation for the given process, or null if the activity has no documentation.
Throws:
OperationException - if a problem occured while getting the process information.
ProcessNotAvailableException - is the process referenced by processId is not valid.

getProcessId

public String getProcessId(InstanceInfo instance)
Returns the ProcessId for this instance.


getProcessId

public String getProcessId(int processIn)
                    throws ProcessNotAvailableException
Throws:
ProcessNotAvailableException

getProcessIds

public String[] getProcessIds()
Returns all ids deployed processes for this session

Returns:

getProcessIds

public String[] getProcessIds(boolean onlyActiveProcess)
Returns all ids deployed processes for this session
If onlyActiveProcess is true, then the ids returned only active processes, if onlyActiveProcess is false, then the ids returned all processes, active and deprecated.

Returns:
an array of process ids

getProcessImage

public String getProcessImage(String processId)
Returns the process designer image in XML format.

Parameters:
processId -
Returns:
the receiver's image in XML format

getProcessIn

public int getProcessIn(String processId)
                 throws ProcessNotAvailableException
Throws:
ProcessNotAvailableException

getProcesses

public Process[] getProcesses(boolean force)
                       throws BatchOperationException
Returns all deployed processes

Parameters:
force - false -> return only loaded processes and don't throw exception if any load process failed. true -> return all processes and do throw exception if any load process failed.
Returns:
ProcessIterator containing Process objects
Throws:
BatchOperationException

getProcesses

public Process[] getProcesses(boolean onlyActiveProcess,
                              boolean force)
                       throws BatchOperationException
Returns all deployed processes

Parameters:
onlyActiveProcess - false -> return deprecated and active processes. true -> return only active processes.
force - false -> return only loaded processes and don't throw exception if any load process failed. true -> return all processes and do throw exception if any load process failed.
Returns:
Process Array containing Process objects
Throws:
BatchOperationException

getSecureEngines

public Map getSecureEngines()

setTimeZone

public void setTimeZone(TimeZone timezone)
Sets the timezon in order to handle dates. param timezone The new TimeZone.


getTimeZone

public TimeZone getTimeZone()
Returns the timezone of this session


getVar

public VarDefinition getVar(String variableId)
Returns a specific variable definition from all the processes this session have. Through a VarDefinition object the following information can be obtained: - The id of the variable - The mask of the variable - The size of the variable - The label of the variable for a given Locale

Returns:

getVars

public VarDefinition[] getVars()
Returns all the variable definitions from all the processes this session have. Through a VarDefinition object the following information can be obtained: - The id of the variable - The mask of the variable - The size of the variable - The label of the variable for a given Locale

Returns:

getView

public View getView(String viewId)
             throws OperationException
Returns the view of the specific View Id

Parameters:
viewId - Id of view
Returns:
Throws:
ViewOperationException
ProcessNotAvailableException - trying to get the participant processes
OperationException

getViewIds

public String[] getViewIds()
                    throws OperationException,
                           BatchOperationException
Returns an array with the Ids of views for the current participant.

Returns:
the view ids or an empty array if no proceces were found for this session
Throws:
OperationException
BatchOperationException

getVisibleActivities

public String[] getVisibleActivities(String processId)
                              throws OperationException
Returns all the visible activities for this participant in given process identification or for all versions of the consolidated process identification.

Parameters:
processId - The process where to search for visible activities.
Returns:
String[] All the visible activities for this participant.
Throws:
ProcessNotAvailableException - If the process is not available.
OperationException

getWorkingAttachments

public Attachment[] getWorkingAttachments(String processId)
                                   throws OperationException
Returns all attachments currently locked by the current user in the given processes

Parameters:
processId -
Returns:
Throws:
ProcessNotAvailableException
AttachmentOperationException
AttachmentOperationException
ProcessNotAvailableException
ProcessOperationException
OperationException

addHistories

public void addHistories(InstanceStamp[] instancesStamp)
                  throws OperationException
Throws:
OperationException

close

public void close()
This method close all connection with the directory and remove all reference with the engines and the processes. If execute any operation when the session is closed, the method can not execute and throw a OperationRuntimeException. For reuse this session you need recreate it.


createPresentation

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

createProcessInstance

public InstanceInfo createProcessInstance(String targetProcessId,
                                          Arguments arguments)
                                   throws OperationException
Creates a new process instance in a particular process or in the active process if you use the consolidated process identification.

Parameters:
targetProcessId - Process identification or the consolidated process identification to create the new instance.
arguments - DynamicObject containing the process instance initialization data. (Support only DynamicObject.create() to instantiate the DynamicObject).
Returns:
The newly created process instance
Throws:
ProcessNotAvailableException
ProcessOperationException
ParticipantException - Ex. String myURLDirectory = "protocol://host:port/dn"; String userId = "myAlias"; String password = "myPassword"; ProcessService service = ProcessService.create(myURLDirectory); ProcessServiceNESession neSession = service.createNESession(userId, password); String processId = "MyProcessId"; DynamicObject arguments = DynamicObject.create(); arguments.setField(ArgumentName, ArgumentValue); neSession.createProcessInstance(processId, arguments);
OperationException
See Also:
createProcessInstance(String, String, Arguments)

createProcessInstance

public InstanceInfo createProcessInstance(String targetProcessId,
                                          String argumentsSetName,
                                          Arguments arguments)
                                   throws OperationException
Creates a new process instance in a particular process or in the active process if you use the consolidated process identification.

Parameters:
targetProcessId - Process identification or the consolidated process identification to create the new instance.
argumentsSetName - Which set of arguments.
arguments - DynamicObject containing the process instance initialization data. (Support only DynamicObject.create() to instantiate the DynamicObject).
Returns:
The newly created process instance
Throws:
ProcessNotAvailableException
ProcessOperationException
ParticipantException - Ex. String myURLDirectory = "protocol://host:port/dn"; String userId = "myAlias"; String password = "myPassword"; ProcessService service = ProcessService.create(myURLDirectory); ProcessServiceNESession neSession = service.createNESession(userId, password); String processId = "MyProcessId"; DynamicObject arguments = DynamicObject.create(); arguments.setField(ArgumentName, ArgumentValue); neSession.createProcessInstance(processId, arguments);
OperationException

createView

public EditableView createView(ViewType viewType,
                               String viewId,
                               String[] assignedProcesses)
                        throws OperationException
To create a view. Depending on the viewType it will create an AttachmentsView, an ApplicationsView or an InstancesView. Keep in mind that the Id must be a valid Id, there exists some restrictions, so use checkViewIdValue to know if it is correct.

Parameters:
viewType - its the view type you
viewId - the key to name this new presentation. Note: use checkViewIdValue(id) here.
assignedProcesses - the processes to assign to the view
Returns:
result the new EditableView
Throws:
ViewOperationException - the exception thrown here is InvalidViewTypeException or ViewOperationException when the user couldn't craete a specific ViewType.
OperationException
See Also:
ViewType

customRunGlobalActivity

public GlobalExecution customRunGlobalActivity(String activityId,
                                               Arguments arguments)
                                        throws OperationException
Runs a global activity, if it is a global creation activity, it returns a GlobalExecution representing this execution.

Parameters:
activityId - The name of the Global Creation activity
arguments - Arguments of the CIL associated to the activity, if this is a global creation these are only the output ones.
Returns:
GlobalExecution object used to continue this execution
Throws:
OperationException
fuego.lang.AbortedException - if the during the processing of an activity item, the execution was aborted
NoPermissionException - if the current user has no permissions to create instances in this process
fuego.components.NoSuchActivityException - if the specified activity doesn't exist in the process

hasNewInstances

public boolean hasNewInstances(String viewId)
Return if the views contains new instances or not.

Returns:
true if the view contains new instances and false if not.

hasNewInstances

public boolean hasNewInstances()
                        throws OperationException
Return if the visible views (not hidden views) of this session contains new instances or not.

Returns:
true if the views of this session contains new instances and false if not.
Throws:
OperationException - Throw this exception when the session could not load the views.

refresh

public void refresh(InstanceInfo instanceInfo)
             throws OperationException
Forces the reload of the given instance info

Parameters:
instanceInfo -
Throws:
ProcessOperationException
OperationException

retrieveRoleProperties

public Map retrieveRoleProperties(String roleId,
                                  String category)
                           throws OperationException
Return a java.util.Map with all properties of the role for the specific category

Parameters:
roleId - Role identification
category - Properties category
Returns:
Throws:
OperationException

retrieveUserProperties

public Map retrieveUserProperties(String category)
                           throws OperationException
Returns user directory properties

Parameters:
category -
Returns:
a map with the properties
Throws:
PropertyOperationException
OperationException

retrieveUserStringProperty

public String retrieveUserStringProperty(String category,
                                         String key)
                                  throws PropertyOperationException
Returns a string user directory property

Parameters:
category -
key -
Returns:
the requested property
Throws:
PropertyOperationException

runGlobalActivity

public InstanceInfo runGlobalActivity(String activityId)
                               throws OperationException
Runs a global activity, if it is a global creation activity, it returns a process instance, null otherwise.

This is the same than: process.runGlobalActivity(activityName, null);

Parameters:
activityId - Activity id or consolidatad activity id to run
Returns:
The newly created process instance
Throws:
ProcessOperationException
fuego.lang.AbortedException - if the during the processing of an activity item, the execution was aborted
NoPermissionException - if the current user has no permissions to create instances in this process
fuego.components.NoSuchActivityException - if the specified activity doesn't exist in the process
OperationException

runGlobalActivity

public InstanceInfo runGlobalActivity(String activityId,
                                      Arguments arguments)
                               throws OperationException
Runs a global activity, if it is a global creation activity, it returns a process instance, null otherwise.

Parameters:
activityId - Activity id or consolidatad activity id to run
arguments - Arguments of the CIL associated to the activity, if this is a global creation these are only the output ones.
Returns:
The newly created process instance
Throws:
OperationRuntimeException
fuego.lang.AbortedException - if the during the processing of an activity item, the execution was aborted
NoPermissionException - if the current user has no permissions to create instances in this process
fuego.components.NoSuchActivityException - if the specified activity doesn't exist in the process
OperationException

runProcess

public void runProcess(String targetProcessId,
                       String argumentsSetName,
                       Arguments arguments,
                       long timeout)
                throws OperationException
Creates a new process instance in a particular process or in the active process if you use the consolidated process identification, and waits for the instance to reach the End activity up to a 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 a InstanceTimeoutException.
Note that the current participant must have the same role than the begin activity.

This method is similar to createProcessInstance(String, String, Arguments).

Parameters:
targetProcessId - Process identification or the consolidated process identification to create the new instance.
argumentsSetName - Which set of arguments.
arguments - DynamicObject containing the process instance initialization data. (Support only DynamicObject.create() to instantiate the DynamicObject).
timeout - how much time to wait for the instance to reach the end activity. a value of zero (0L) means wait as long as it takes.
Throws:
OperationException - If something goes wrong. The specific subclass of OperationException explains the details of the failure
InstanceAbortedException - If the instance is aborted and doesn't complete normally.
InstanceTimeoutException - If more than timeout milliseconds have passed since this method was called and the instance hasn't reached the end activity.
See Also:
createProcessInstance(String, String, Arguments)

searchParticipantsByName

public Participant[] searchParticipantsByName(String name)
                                       throws OperationException
Returns an array with all the Participants that match the given name.

Parameters:
name -
Returns:
Throws:
ParticipantNotFoundException
OperationException

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 that must receive the notification
activityName - activity where to send the notification
notification - set of arguments to send as notification
sourceInstanceId - instance that send the notification. Note: set null value for external notifications.
Throws:
ProcessOperationException
OperationException
See Also:
sendNotification(String, String, String, Arguments, String)

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

Parameters:
targetInstanceOrProcessId - instance that must receive the notification
activityName - activity where to send the notification
targetArgumentsSetName - name of the desired target argument set. Note: null value, for default set
notification - set of arguments to send as notification
sourceInstanceId - instance that send the notification. Note: set null value for external notifications.
Throws:
ProcessOperationException
OperationException
See Also:
sendNotification(String,String,String, Arguments)

sendNotification

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

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

Parameters:
targetInstanceOrProcessId - instance that must receive the notification
activityName - activity where to send the notification
notification - set of arguments to send as notification
Throws:
OperationException
See Also:
sendNotification(String,String,String,Arguments), sendNotification(String,String,Arguments,String)

sendNotification

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

Parameters:
targetInstanceOrProcessId - instance that must receive the notification
activityName - activity where to send the notification
targetArgumentsSetName - argument set chosen
notification - set of arguments to send as notification
Throws:
OperationException
See Also:
sendNotification(String,String,Arguments,String)

storeUserProperties

public void storeUserProperties(String category,
                                Map properties)
                         throws OperationException
Throws:
OperationException

Fuego Process API

© Copyright 1996/2003 Fuego Inc. All Rights Reserved