Oracle Fusion Middleware
Java API Reference for Oracle BPM Suite
11g Release 1 (11.1.1.7.0)
E25378-07

oracle.bpm.services.organization
Interface IBPMOrganizationService


public interface IBPMOrganizationService

IBPMOrganizationService Provides APIs to access Organization Unit, Business Calendar, Busienss Holiday, Extended user Properties People query and BPM-Application Roles. This interface defines following methods
1. Search Organizational entities
2. CRUD APIs for Organization Unit
3. CRUD APIs for Calendar Rules
4. CRUD APIs for Holiday Rules
5. Extended User Property APIs
6. People query execution APIh
7. AppRole Management APIs (Create/Delete/Grant etc)
8. CRUD APIs for Orgnizational entities association
9. Import and Export of Organizational entities
10. CRUDS APIs for LPG


Method Summary
 void addParticipantPropertyValue(IBPMContext ctx, ParticipantProperty property)
          This API may only be called by an Administrator and it defines a new value or multiple new values for an existing STRING type extended user property already defined in the system.
 ApplicationRoleOrgUnitCalendarAssociation createApplicationRoleOrgUnitCalendarAssociation(IBPMContext ctx, ApplicationRoleOrgUnitCalendarAssociation applicationRoleOrgUnitCalendarAssociation)
          createApplicationRoleOrgUnitCalendarAssociation API can be used to create a mapping between ApplicationRole, OrganizationalUnit, and CalendarRule.
 void createAppRole(IBPMContext wctx, ApplicationContext appCtx, java.lang.String appRoleName, java.lang.String optionalDisplayName, java.lang.String optionalDesc)
          Creates an app role within the application context
 CalendarRule createCalendarRule(IBPMContext ctx, CalendarRule cal)
          Create Calendar rule.
 HolidayRule createHolidayRule(IBPMContext ctx, HolidayRule holidayRule)
          Create HolidayRule If id is specified in HolidayRule object, it would be honored.
 LogicalPeopleGroup createLogicalPeopleGroup(IBPMContext ctx, LogicalPeopleGroup lpg, boolean isExecuteImmediate)
          Creates LogicalPeopleGroup
 OrganizationalUnit createOrganizationalUnit(IBPMContext ctx, OrganizationalUnit organizationalUnit)
          createOrganizationalUnit API can be used to create an OrganizationalUnit.
 void createParticipantProperty(IBPMContext ctx, ParticipantProperty property)
          This API may only be called by an Administrator and it defines a new extended user property in the system.
 void deleteAllPropertiesOnParticipants(IBPMContext ctx, java.util.List<Participant> participants)
          Allows client to delete all properties defined on the list of participants provided.
 void deleteApplicationRoleOrgUnitCalendarAssociation(IBPMContext ctx, java.lang.String applicationRoleOrgUnitCalendarAssociationId)
          deleteApplicationRoleOrgUnitCalendarAssociation API can be used to delete an ApplicationRoleOrgUnitCalendarAssociation.
 void deleteCalendarRule(IBPMContext ctx, java.lang.String calendarID, boolean force)
          Deletes a calendar rule Administrative privilege is needed to call this method
 void deleteHolidayRule(IBPMContext ctx, java.lang.String holidayRuleId, boolean force)
          Deletes a HolidayRule Administrative privilege is needed to call this method
 void deleteLogicalPeopleGroup(IBPMContext ctx, java.lang.String lpgId, boolean force)
          Deletes LogicalPeopleGroup
 void deleteOrganizationalUnit(IBPMContext ctx, java.lang.String organizationalUnitId, boolean includingChildren, boolean force)
          deleteOrganiztionalUnit API can be used to delete an OrganizationalUnit.
 void deleteParticipantProperty(IBPMContext ctx, ParticipantProperty property, boolean force)
          This API may only be called by an Administrator and it deletes an extended user property defined in the system.
 void deleteParticipantPropertyValue(IBPMContext ctx, ParticipantProperty property, boolean force)
          This API may only be called by an Administrator and it deletes a value or multiple values of a String property defined in the system.
 java.util.List<Participant> executePeopleQuery(IBPMContext ctx, PeopleQuery peopleQuery, PeopleQueryContext peopleQueryCtx)
          Executes peopleQuery
 Organization exportOrganization(IBPMContext ctx)
          exportOrganization API can be used to obtain the entire Organization, which consists of a hierarchy of OrganizationalUnits, ApplicationRoleOrgUnitCalendarAssociations, HolidayRules, Calendar Rules, Extended user properties, etc.
 java.util.List<ParticipantProperties> getAllAssignedParticipantProperties(IBPMContext ctx)
          Retrieves all the properties that are currently assigned to all the participants in the system.
 java.util.List<ApplicationRoleOrgUnitCalendarAssociation> getApplicationRoleOrgUnitCalendarAssociation(IBPMContext ctx, RoleProfile applicationRole)
          getApplicationRoleOrgUnitCalendarAssociation API can be used to retrieve all the ApplicationRoleOrgUnitCalendarAssociation for the given Application Role
 CalendarRule getCalendarRule(IBPMContext ctx, java.lang.String organizationalUnitId)
          getCalendarRule API will fetch the CalendarRule associated with the OrganizationalUnit.
 CalendarRule getCalendarRuleForRole(IBPMContext ctx, java.lang.String organizationalUnitId, RoleProfile applicationRole)
          getCalendarRule API will fetch the CalendarRule associated with the ApplicationRole in the given OrganizationalUnit.
 HolidayRule getHolidayRule(IBPMContext ctx, java.lang.String holidayRuleId)
          Gets a Holliday Rule object.
 LogicalPeopleGroup getLogicalPeopleGroup(IBPMContext ctx, java.lang.String lpgId)
          Gets LogicalPeopleGroup
 java.util.List<Participant> getLogicalPeopleGroupMembers(IBPMContext ctx, java.lang.String lpgId)
          Gets LogicalPeopleGroup's members from the LPG cache
 java.util.List<LogicalPeopleGroup> getLogicalPeopleGroupsForUser(IBPMContext ctx, PrincipleRefType user)
          Gets LogicalPeopleGroup
 OrganizationalUnit getOrganizationalUnit(IBPMContext ctx, java.lang.String organizationalUnitId, ChildOrganizationalUnitRetrievalModeTypeEnum childOrganizationalUnitRetrievalMode)
          getOrganizationalUnit API can be used to fetch an OrganizationalUnit given its OrganizationalUnitId.
 java.util.List<OrganizationalUnit> getOrganizationalUnitForUser(IBPMContext ctx, java.lang.String userId, java.lang.String identityContext, boolean direct)
           
 java.util.List<Participant> getParticipantsWithProperties(IBPMContext ctx, java.util.List<Participant> setOfParticipants, java.util.List<ParticipantProperty> props, int startRow, int endRow)
          Get a list of participants which have the specified properties defined on them.
 java.util.List<ParticipantProperties> getPropertiesOfParticipants(IBPMContext ctx, java.util.List<Participant> participants)
          Retrieves properties defined on the participants.
 void grantAppRoleToPrincipal(IBPMContext wctx, ApplicationContext appCtx, java.lang.String approleName, Participant participant)
          Grants an appRole to the specified Principal
 void grantPermissionToAppRole(IBPMContext wctx, ApplicationContext appCtx, java.lang.String approleName, Permission perm)
          Grants Permission to AppRole
 Organization importOrganization(IBPMContext ctx, Organization organization, boolean validateUsers)
          importOrganization API can be used to import an entire Organization, which consists of a hierarchy of OrganizationalUnits, ApplicationRoleOrgUnitCalendarAssociations, HolidayRules, Calendar Rules, Extended user properties, etc.
 void removeAppRole(IBPMContext wctx, ApplicationContext appCtx, java.lang.String appRoleName, boolean force)
          Deletes an app role from the policy store
 void revokeAppRoleFromPrincipal(IBPMContext wctx, ApplicationContext appCtx, java.lang.String approleName, Participant participant)
          Revokes an appRole from the specified Principal
 void revokePermissionFromAppRole(IBPMContext wctx, ApplicationContext appCtx, java.lang.String approleName, Permission perm)
          Revokes the permission from an AppRole
 java.util.List<ParticipantProperty> searchExtendedUserProperties(IBPMContext ctx, java.lang.String propertyName)
          Retrieve all property definitions that match the provided name.
 java.util.List<LogicalPeopleGroup> searchLogicalPeopleGroups(IBPMContext ctx, SearchModeTypeEnum searchMode, java.lang.String searchCriteria, int startRow, int endRow)
          Searches LogicalPeopleGroup
 java.util.List searchOrganizationEntity(IBPMContext ctx, OrganizationEntityTypeEnum organizationEntity, SearchModeTypeEnum searchMode, java.lang.String searchCriteria, int startRow, int endRow)
          Deprecated.  
 java.util.List searchOrganizationEntity(IBPMContext ctx, OrganizationEntityTypeEnum organizationEntity, SearchModeTypeEnum searchMode, java.lang.String searchCriteria, int startRow, int endRow, OrganizationEntitySearchContext organizationEntitySearchContext)
          searchOrganizationEntity can be used to search for any organization entity like OrganizationalUnit, Role, HolidayRule, CalendarRule, Extended User etc.
 java.util.List<Participant> searchParticipantsWithProperties(IBPMContext ctx, java.util.List<Participant> setOfParticipants, Predicate predicate, int startRow, int endRow)
          Get a list of participants which have the specified properties defined on them.
 void setPropertiesOnParticipants(IBPMContext ctx, java.util.List<ParticipantProperties> properties)
          Allows client to define properties on a set of participants.
 ApplicationRoleOrgUnitCalendarAssociation updateApplicationRoleOrgUnitCalendarAssociation(IBPMContext ctx, ApplicationRoleOrgUnitCalendarAssociation applicationRoleOrgUnitCalendarAssociation)
          updateApplicationRoleOrgUnitCalendarAssociation API can be used to update the Calendar and OrganizationalUnit of this association.
 CalendarRule updateCalendarRule(IBPMContext ctx, CalendarRule updatedCalendar)
          Updates a calendar rule Administrative privilege is needed to call this method
 HolidayRule updateHolidayRule(IBPMContext ctx, HolidayRule updatedHolidayRule)
          Updates a HolidayRule Administrative privilege is needed to call this method
 LogicalPeopleGroup updateLogicalPeopleGroup(IBPMContext ctx, LogicalPeopleGroup lpg, boolean isExecuteImmediate)
          Updates LogicalPeopleGroup
 OrganizationalUnit updateOrganizationalUnit(IBPMContext ctx, OrganizationalUnit organizationalUnit)
          updateOrganizationalUnit API can be used to update any changes to the OrganizationalUnit including specifying/changing the description of the OrganizationalUnit, CalendarRule, Members, ManagedByMembers, Children OrganizationalUnits, etc.
 void updateParticipantPropertyName(IBPMContext ctx, java.lang.String oldName, java.lang.String newname)
          This API may only be called by an Administrator and it changes the name of an existing property.
 void updateParticipantPropertyValue(IBPMContext ctx, java.lang.String propertyName, java.lang.String oldValue, java.lang.String newValue)
          This API may only be called by an Administrator and it changes the value defined for an existing STRING property.
 

Method Detail

searchExtendedUserProperties

java.util.List<ParticipantProperty> searchExtendedUserProperties(IBPMContext ctx,
                                                                 java.lang.String propertyName)
                                                                 throws BPMOrganizationException
Retrieve all property definitions that match the provided name. The global property definition table will be searched for matching properties. The search will be performed in a case-insensitive manner and all properties whose name either exactly matches the given name or has the given name embedded in them will be returned because an implicit wild card search is performed. If the name is NULL or an empty string or a "*" then this API returns all the properties defined by the Administrator. For String properties, this includes the values of those properties as well. Date FREEFORM_STRING and Number properties do not have values defined on them and so only their names are returned. Returned list contains internationalized property names if their locale specific values are available in the resource bundles. In case of STRING properties the values too are returned in their locale specifc versions if their internationalized versions are available in the resource bundles. If no internationalized values are available for the locale in which the server is running, then the default property names and values as they were defined are returned.

Parameters:
propertyName - must not be null or empty.
Returns:
List containing matching property definitions or empty if no match is found.
Throws:
BPMOrganizationException - if any error occurs during the search.

getAllAssignedParticipantProperties

java.util.List<ParticipantProperties> getAllAssignedParticipantProperties(IBPMContext ctx)
                                                                          throws BPMOrganizationException
Retrieves all the properties that are currently assigned to all the participants in the system. Participants can be individual users, groups or app roles. Returned list contains internationalized property names and in case of STRING properties, internationalized property values if their locale specific values have been defined in the resource bundles. For DATE, NUMBER and FREEFORM_STRING properties no internationalization is supported. Only the default names and values that were entered when the properties were defined and assigned are returned as is.

Parameters:
ctx - an authenticated IBPMContext
Returns:
List List of ParticipantProperties instances assigned by various managers to various users, groups or app roles.
Throws:
BPMOrganizationException - If an error is thrown by the database.

getLogicalPeopleGroupsForUser

java.util.List<LogicalPeopleGroup> getLogicalPeopleGroupsForUser(IBPMContext ctx,
                                                                 PrincipleRefType user)
                                                                 throws BPMOrganizationException
Gets LogicalPeopleGroup

Parameters:
ctx - authenticated IWorkflowContext for user.
user - a PrincipalRefType object
Returns:
List of LogicalPeopleGroup objects which the user belong to.
Throws:
BPMOrganizationException

getOrganizationalUnitForUser

java.util.List<OrganizationalUnit> getOrganizationalUnitForUser(IBPMContext ctx,
                                                                java.lang.String userId,
                                                                java.lang.String identityContext,
                                                                boolean direct)
                                                                throws BPMOrganizationException
Throws:
BPMOrganizationException

searchOrganizationEntity

java.util.List searchOrganizationEntity(IBPMContext ctx,
                                        OrganizationEntityTypeEnum organizationEntity,
                                        SearchModeTypeEnum searchMode,
                                        java.lang.String searchCriteria,
                                        int startRow,
                                        int endRow)
                                        throws BPMOrganizationException
Deprecated. 

Throws:
BPMOrganizationException

searchOrganizationEntity

java.util.List searchOrganizationEntity(IBPMContext ctx,
                                        OrganizationEntityTypeEnum organizationEntity,
                                        SearchModeTypeEnum searchMode,
                                        java.lang.String searchCriteria,
                                        int startRow,
                                        int endRow,
                                        OrganizationEntitySearchContext organizationEntitySearchContext)
                                        throws BPMOrganizationException
searchOrganizationEntity can be used to search for any organization entity like OrganizationalUnit, Role, HolidayRule, CalendarRule, Extended User etc. The OrganizationEntity parameter can be used to specify what entity to be searched for. SearchMode parameter can be used to specify the type of search like beginsWith, endsWith, contains, etc. startRow and endRow parameters can be used to obtain the results in several pages. The returned objects will just contain the minimal details like Id and the name.

Parameters:
ctx - the workflow context
organizationEntity - the OrganizationEntity to be searched for
searchMode - the SearchMode used to specify the type of search like beginsWith, endsWith, contains, like, equals
startRow - the rownum of the starting row for this query (set to 0 for no paging)
endRow - the rownum of the ending row for this query (set to 0 for no paging)
organizationEntitySearchContext - the OrganizationEntity search context
Returns:
List the list of searched objects which will just contain the minimal details like Id and the name.
Throws:
BPMOrganizationException - any exception thrown during the search

createOrganizationalUnit

OrganizationalUnit createOrganizationalUnit(IBPMContext ctx,
                                            OrganizationalUnit organizationalUnit)
                                            throws BPMOrganizationException
createOrganizationalUnit API can be used to create an OrganizationalUnit. While creating an OrganizationalUnit, it has to mandatory contain the name and all other information is optional. If organizationalUnitId is populated it will be used otherwise an id will be generated for it. OrganizationalUnit can contain childrens and they can contain childrens too.

Parameters:
ctx - the workflow context
organizationalUnit - the OrganizationalUnit to be created
Returns:
OrganizationalUnit the created OrganizationalUnit
Throws:
BPMOrganizationException - any exception thrown during the creation

updateOrganizationalUnit

OrganizationalUnit updateOrganizationalUnit(IBPMContext ctx,
                                            OrganizationalUnit organizationalUnit)
                                            throws BPMOrganizationException
updateOrganizationalUnit API can be used to update any changes to the OrganizationalUnit including specifying/changing the description of the OrganizationalUnit, CalendarRule, Members, ManagedByMembers, Children OrganizationalUnits, etc.

Parameters:
ctx - the workflow context
organizationalUnit - the OrganizationalUnit that contains the updated information
Returns:
boolean true if update succeeded, otherwise false
Throws:
BPMOrganizationException - any exception thrown during the update

deleteOrganizationalUnit

void deleteOrganizationalUnit(IBPMContext ctx,
                              java.lang.String organizationalUnitId,
                              boolean includingChildren,
                              boolean force)
                              throws BPMOrganizationException
deleteOrganiztionalUnit API can be used to delete an OrganizationalUnit. Upon deleting an OrganizationalUnit its Members, ManagedByMembers also gets deleted. Deletion of the hierarchy of its child OrganizationalUnits depends on the boolean flag includingChildren. If includingChildren is true, the entire hirearchy of children will be deleted. If includingChildren is false, then none of the children will be deleted and the parent of the first level children will become null.

Parameters:
ctx - the workflow context
organizationalUnitId - the organizationalUnitId String value of the OrganizationalUnit to be deleted
includingChildren - If this boolean flag is true, the entire hirearchy of children will be deleted. If it is false, then none of the children will be deleted and the parent of the first level children will become null.
force -
Throws:
BPMOrganizationException - any exception thrown during deletion

getOrganizationalUnit

OrganizationalUnit getOrganizationalUnit(IBPMContext ctx,
                                         java.lang.String organizationalUnitId,
                                         ChildOrganizationalUnitRetrievalModeTypeEnum childOrganizationalUnitRetrievalMode)
                                         throws BPMOrganizationException
getOrganizationalUnit API can be used to fetch an OrganizationalUnit given its OrganizationalUnitId.

Parameters:
ctx - the workflow context
organizationalUnitId - the organizationalUnitId String value
childOrganizationalUnitRetrievalMode - the ChildOrganizationalUnitRetrievalMode to specify how the children of this OrganizationalUnit needs to be retrieved
Returns:
OrganizationalUnit the queried OrganizationalUnit
Throws:
BPMOrganizationException - any exception thrown during the query

getCalendarRule

CalendarRule getCalendarRule(IBPMContext ctx,
                             java.lang.String organizationalUnitId)
                             throws BPMOrganizationException
getCalendarRule API will fetch the CalendarRule associated with the OrganizationalUnit. If no CalendarRule is associated with the OrganizationalUnit, it will traverse the hirearchy until it finds one. If none is found, it will return null.

Parameters:
ctx - the workflow context
organizationalUnitId - the organizationalUnitId String value of the OrganizationalUnit
Returns:
the CalendarRule associated with the OrganizationalUnit
Throws:
BPMOrganizationException - any exception thrown during query

getCalendarRuleForRole

CalendarRule getCalendarRuleForRole(IBPMContext ctx,
                                    java.lang.String organizationalUnitId,
                                    RoleProfile applicationRole)
                                    throws BPMOrganizationException
getCalendarRule API will fetch the CalendarRule associated with the ApplicationRole in the given OrganizationalUnit. If no such association exists, then the CalendarRule associated with the OrganizationalUnit is returned. If no CalendarRule is associated with the given OrganizationalUnit, it will traverse the hirearchy until it finds one. If none is found, it will return null.

Parameters:
ctx - the workflow context
organizationalUnitId - the organizationalUnitId String value of the OrganizationalUnit
applicationRole - the RoleProfile that defines the ApplicationRole
Returns:
the CalendarRule associated with the ApplicationRole in the given OrganizationalUnit
Throws:
BPMOrganizationException - any exception thrown during query

createCalendarRule

CalendarRule createCalendarRule(IBPMContext ctx,
                                CalendarRule cal)
                                throws BPMOrganizationException
Create Calendar rule. If guid is specified in calendar object, it would be honored. If not, a new guid would be created and returned. Administrative privilege is needed to call this method.

Parameters:
ctx - an authenticated IBPMContext
cal - is the calendar to be created
Returns:
new calendar
Throws:
BPMOrganizationException - if calendar with same name has already been created.

updateCalendarRule

CalendarRule updateCalendarRule(IBPMContext ctx,
                                CalendarRule updatedCalendar)
                                throws BPMOrganizationException
Updates a calendar rule Administrative privilege is needed to call this method

Parameters:
ctx - an authenticated IBPMContext
updatedCalendar -
Returns:
updated calendar
Throws:
BPMOrganizationException

deleteCalendarRule

void deleteCalendarRule(IBPMContext ctx,
                        java.lang.String calendarID,
                        boolean force)
                        throws BPMOrganizationException
Deletes a calendar rule Administrative privilege is needed to call this method

Parameters:
ctx - an authenticated IBPMContext
calendarID - is calendar identifier - guid
force -
Throws:
BPMOrganizationException

getHolidayRule

HolidayRule getHolidayRule(IBPMContext ctx,
                           java.lang.String holidayRuleId)
                           throws BPMOrganizationException
Gets a Holliday Rule object. No special privilege needed to call this API.

Parameters:
ctx - an authenticated IBPMContext
HolidayRuleId - unique Id of the holiday rule to be fetched.
Returns:
HolidayRule object
Throws:
BPMOrganizationException

createHolidayRule

HolidayRule createHolidayRule(IBPMContext ctx,
                              HolidayRule holidayRule)
                              throws BPMOrganizationException
Create HolidayRule If id is specified in HolidayRule object, it would be honored. If not, a new guid would be created and returned Administrative privilege is needed to call this method.

Parameters:
ctx - an authenticated IBPMContext
holidays - is the HolidayList to be created
Returns:
new HolidayRule
Throws:
BPMOrganizationException - is holiday list with same name has already been created.

updateHolidayRule

HolidayRule updateHolidayRule(IBPMContext ctx,
                              HolidayRule updatedHolidayRule)
                              throws BPMOrganizationException
Updates a HolidayRule Administrative privilege is needed to call this method

Parameters:
ctx - an authenticated IBPMContext
updatedHolidayRule -
Returns:
updated HolidayRule
Throws:
BPMOrganizationException

deleteHolidayRule

void deleteHolidayRule(IBPMContext ctx,
                       java.lang.String holidayRuleId,
                       boolean force)
                       throws BPMOrganizationException
Deletes a HolidayRule Administrative privilege is needed to call this method

Parameters:
ctx - an authenticated IBPMContext
HolidayRuleId - is HolidayRule identifier
force -
Throws:
BPMOrganizationException

getPropertiesOfParticipants

java.util.List<ParticipantProperties> getPropertiesOfParticipants(IBPMContext ctx,
                                                                  java.util.List<Participant> participants)
                                                                  throws BPMOrganizationException
Retrieves properties defined on the participants.

Parameters:
ctx - an authenticated IBPMContext
participants - List of Participants whose properties need to be fetched.
Returns:
List
Throws:
BPMOrganizationException - If an error is thrown by the database.

setPropertiesOnParticipants

void setPropertiesOnParticipants(IBPMContext ctx,
                                 java.util.List<ParticipantProperties> properties)
                                 throws BPMOrganizationException
Allows client to define properties on a set of participants. Participants as well as the properties to be defined on each of them are encapsulated inside the ParticipantProperties instance.

Parameters:
ctx - an authenticated IBPMContext
properties - List of properties to be defined on the participant in the ParticipantProperties instance.
Throws:
BPMOrganizationException - If an error is thrown by the database.

deleteAllPropertiesOnParticipants

void deleteAllPropertiesOnParticipants(IBPMContext ctx,
                                       java.util.List<Participant> participants)
                                       throws BPMOrganizationException
Allows client to delete all properties defined on the list of participants provided.

Parameters:
ctx - an authenticated IBPMContext
participants - List of Participants whose properties need to be deleted.
Throws:
BPMOrganizationException - If an error is thrown by the database.

searchParticipantsWithProperties

java.util.List<Participant> searchParticipantsWithProperties(IBPMContext ctx,
                                                             java.util.List<Participant> setOfParticipants,
                                                             Predicate predicate,
                                                             int startRow,
                                                             int endRow)
                                                             throws BPMOrganizationException
Get a list of participants which have the specified properties defined on them. The properties to search for are defined in the Predicate instance. The list of participants returned is a subset of the list of participants provided as input. The implementation searches for participants only within the set of participants provided to find those with matching properties.

Parameters:
ctx - an authenticated IBPMContext
setOfParticipants - List of Participants to search within to find those with matching properties
predicate - Contains the search criteria defined using property names and their values. Eg. SKILL = 'Java' AND HIRE_DATE > '10/10/2009'
startRow - Indicates the start row in the result set from which to include rows in the returned list
endRow - Indicates the end row in the result set after which no rows from the result set are included in the returned list
Returns:
List List of participants with matching properties from within the set of participants provided as input.
Throws:
BPMOrganizationException - If the Predicate specifies any properties that are not defined in the system or specifies any values for STRING properties that are not defined in the system or if the Predicate instance is NULL or if Toplink throws an error or if the database throws an error.

getParticipantsWithProperties

java.util.List<Participant> getParticipantsWithProperties(IBPMContext ctx,
                                                          java.util.List<Participant> setOfParticipants,
                                                          java.util.List<ParticipantProperty> props,
                                                          int startRow,
                                                          int endRow)
                                                          throws BPMOrganizationException
Get a list of participants which have the specified properties defined on them. The properties to search for are defined in the list of properties. The list of properties is interpreted as follows: For multi-valued String properties, if multiple values are provided for that property then they are ORed together, and the resulting boolean expression is then ANDed with other properties. Example: Assume that SKILL is a multi-valued String property defined with 2 values such as Java and COBOL and there is a Date property called HIRE_DATE. Then if the list of properties provided in the input contains 1 instance of ParticipantProperty with name equalt to SKILL and values equal to Java and COBOL and another instance of ParticipantProperty with name equal to HIRE_DATE and value equal to '10/10/2009' then the following search criteria will be used to search for participants: (SKILL = 'Java' OR SKILL = 'COBOL') AND (HIRE_DATE = '10/10/2009') NOTE: This API does not allow clients to specify complex search criteria. All values will be searched with "EQUALITY" as the matching condition. If you wish to use other match conditions such as "GREATER THAN", "LESS THAN" then you need to use the API which takes a Predicate instance. The implementation searches for participants only within the set of participants provided to find those with matching properties.

Parameters:
ctx - an authenticated IBPMContext
setOfParticipants - List of Participants to search within to find those with matching properties
props - Contains the search criteria defined using property names and their values. Eg. SKILL = 'Java' AND HIRE_DATE = '10/10/2009'
Returns:
List List of participants with matching properties from within the set of participants provided as input.
Throws:
BPMOrganizationException - If the list of properties specifies a property name which is not defined in the system or specifies any values for STRING properties that are not defined in the system or if the props list is NULL or if Toplink throws an error or if the database throws an error.

createParticipantProperty

void createParticipantProperty(IBPMContext ctx,
                               ParticipantProperty property)
                               throws BPMOrganizationException
This API may only be called by an Administrator and it defines a new extended user property in the system. For STRING proprties, it also defines the possible values of the property. For DATE and NUMBER properties, only the property name can be defined. Once a property has been defined using this API, it may be assigned to various participants using the "setPropertiesOnParticipants" API.

Parameters:
ctx - an authenticated IBPMContext
property - An instance of ParticipantProperty which defines the property name and in case of String properties, it's values that are to be defined. Date and Number type properties do not have a value defined for them.
Throws:
BPMOrganizationException - If the property is already defined or if values have been specified in the definition of NUMBER or DATE properties or if the database throws as error.

addParticipantPropertyValue

void addParticipantPropertyValue(IBPMContext ctx,
                                 ParticipantProperty property)
                                 throws BPMOrganizationException
This API may only be called by an Administrator and it defines a new value or multiple new values for an existing STRING type extended user property already defined in the system. Once a value or multiple values for a STRING type property have been defined using this API, they may be assigned to various participants using the "setPropertiesOnParticipants" API.

Parameters:
ctx - an authenticated IBPMContext
property - An instance of ParticipantProperty which specifies the name of an existing STRING property defined in the system as well as supplies the new value(s) which are to be associated with this property.
Throws:
BPMOrganizationException - If the value is already defined on the STRING property or if the specified property is defined as a NUMBER or a DATE property or if the database throws as error.

deleteParticipantProperty

void deleteParticipantProperty(IBPMContext ctx,
                               ParticipantProperty property,
                               boolean force)
                               throws BPMOrganizationException
This API may only be called by an Administrator and it deletes an extended user property defined in the system. If the force flag is set to false, then the property will only be deleted if it has not been assigned to any participants, otherwise an exception will be thrown. If the force flag is set to true, the property will be unassigned from all the participants to whom it has been assigned and then its definition will be deleted.

Parameters:
ctx - an authenticated IBPMContext
property - An instance of ParticipantProperty which specifies the name of the property to be deleted.
force - If set to TRUE, will cause the property to be unassigned from the various participants to whom it has been assigned and then deleted from the system. Use this flag with caution.
Throws:
BPMOrganizationException - If the specified property is not defined in the system or if the force flag is set to false and the property being deleted is assigned to participants or if the database throws as error.

deleteParticipantPropertyValue

void deleteParticipantPropertyValue(IBPMContext ctx,
                                    ParticipantProperty property,
                                    boolean force)
                                    throws BPMOrganizationException
This API may only be called by an Administrator and it deletes a value or multiple values of a String property defined in the system. If the force flag is set to false, then the value(s) will only be deleted if they are not assigned to any participants, otherwise an exception will be thrown. If the force flag is set to true, the property value will be unassigned from all the participants to whom it has been assigned and then the value(s) will be deleted. Note that only STRING properties have values defined on them and so this API may only be invoked to delete defined values of STRING properties.

Parameters:
ctx - an authenticated IBPMContext
property - An instance of ParticipantProperty which specifies the name of the property to be deleted.
force - If set to TRUE, will cause the property to be unassigned from the various participants to whom it has been assigned and then deleted from the system. Use this flag with caution.
Throws:
BPMOrganizationException - If the specified property value is not defined on the STRING property in the system or if the force flag is set to false and the specified value is assigned to participants or if the database throws as error.

updateParticipantPropertyName

void updateParticipantPropertyName(IBPMContext ctx,
                                   java.lang.String oldName,
                                   java.lang.String newname)
                                   throws BPMOrganizationException
This API may only be called by an Administrator and it changes the name of an existing property. The property whose name is being changed may or may not be assigned to any participants.

Parameters:
ctx - an authenticated IBPMContext
oldName - The existing name of the property.
newname - The new name of the same property definition.
Throws:
BPMOrganizationException - If the oldName specified in the input does not match any property defined in the system or if the database throws as error.

updateParticipantPropertyValue

void updateParticipantPropertyValue(IBPMContext ctx,
                                    java.lang.String propertyName,
                                    java.lang.String oldValue,
                                    java.lang.String newValue)
                                    throws BPMOrganizationException
This API may only be called by an Administrator and it changes the value defined for an existing STRING property. NUMBER and DATE properties do not have any values defined on them and therefore this API may not be used to update their values. The oldValue specified in the input must exist otherwise an exception will be thrown. If the value is assigned to any participants, then it will get updated for all of them.

Parameters:
ctx - an authenticated IBPMContext
propertyName - The name of the property whose value needs to be updated.
oldName - The existing name of the property.
newname - The new name of the same property definition.
Throws:
BPMOrganizationException - If the specified propertyName does not exist in the system or it exists but it does not have the oldValue specified in the input or if the database throws an error.

createLogicalPeopleGroup

LogicalPeopleGroup createLogicalPeopleGroup(IBPMContext ctx,
                                            LogicalPeopleGroup lpg,
                                            boolean isExecuteImmediate)
                                            throws BPMOrganizationException
Creates LogicalPeopleGroup

Parameters:
ctx - authenticated IWorkflowContext for user.
lpg - a LogicalPeopleGroup object
isExecuteImmediate - a boolean flag. If true LogicalPeopleGroup membership is defined immediately
Returns:
new LogicalPeopleGroup object
Throws:
BPMOrganizationException

updateLogicalPeopleGroup

LogicalPeopleGroup updateLogicalPeopleGroup(IBPMContext ctx,
                                            LogicalPeopleGroup lpg,
                                            boolean isExecuteImmediate)
                                            throws BPMOrganizationException
Updates LogicalPeopleGroup

Parameters:
ctx - authenticated IWorkflowContext for user.
lpg - a LogicalPeopleGroup object
isExecuteImmediate - a boolean flag. If true LogicalPeopleGroup membership is defined immediately
Returns:
updated LogicalPeopleGroup object
Throws:
BPMOrganizationException

deleteLogicalPeopleGroup

void deleteLogicalPeopleGroup(IBPMContext ctx,
                              java.lang.String lpgId,
                              boolean force)
                              throws BPMOrganizationException
Deletes LogicalPeopleGroup

Parameters:
ctx - authenticated IWorkflowContext for user.
lpgId - an unique LogicalPeopleGroup id
force -
Throws:
BPMOrganizationException

getLogicalPeopleGroup

LogicalPeopleGroup getLogicalPeopleGroup(IBPMContext ctx,
                                         java.lang.String lpgId)
                                         throws BPMOrganizationException
Gets LogicalPeopleGroup

Parameters:
ctx - authenticated IWorkflowContext for user.
lpgId - an unique LogicalPeopleGroup id
Returns:
LogicalPeopleGroup object
Throws:
BPMOrganizationException

searchLogicalPeopleGroups

java.util.List<LogicalPeopleGroup> searchLogicalPeopleGroups(IBPMContext ctx,
                                                             SearchModeTypeEnum searchMode,
                                                             java.lang.String searchCriteria,
                                                             int startRow,
                                                             int endRow)
                                                             throws BPMOrganizationException
Searches LogicalPeopleGroup

Parameters:
ctx - authenticated IWorkflowContext for user.
searchMode - the SearchMode used to specify the type of search like beginsWith, endsWith, contains, like, equals
startRow - the rownum of the starting row for this query (set to 0 for no paging)
endRow - the rownum of the ending row for this query (set to 0 for no paging)
Returns:
List the list of searched objects which will just contain the minimal details like Id and the name.
Throws:
BPMOrganizationException - if any exception thrown during the search

getLogicalPeopleGroupMembers

java.util.List<Participant> getLogicalPeopleGroupMembers(IBPMContext ctx,
                                                         java.lang.String lpgId)
                                                         throws BPMOrganizationException
Gets LogicalPeopleGroup's members from the LPG cache

Parameters:
ctx - authenticated IWorkflowContext for user.
lpgId - an unique LogicalPeopleGroup id
Returns:
a List of Participant object, members of the LogicalPeopleGroup objects
Throws:
BPMOrganizationException

executePeopleQuery

java.util.List<Participant> executePeopleQuery(IBPMContext ctx,
                                               PeopleQuery peopleQuery,
                                               PeopleQueryContext peopleQueryCtx)
                                               throws BPMOrganizationException
Executes peopleQuery

Parameters:
ctx - authenticated IWorkflowContext for user.
peopleQuery - a PeopleQuery object
peopleQueryCtx - a runtime people query context, a list of argumnets, a name-value pair of argument name and its values. All argument's name must start from '$' character
Throws:
BPMOrganizationException

createAppRole

void createAppRole(IBPMContext wctx,
                   ApplicationContext appCtx,
                   java.lang.String appRoleName,
                   java.lang.String optionalDisplayName,
                   java.lang.String optionalDesc)
                   throws BPMOrganizationException
Creates an app role within the application context

Parameters:
wctx - an authenticated IBPMContext
appCtx - The application context in which the appRole has to be created
appRoleName - The name of the appRole which will be created
displayName - The display name of the appRole
desc - Description of the appRole
Throws:
BPMOrganizationException

removeAppRole

void removeAppRole(IBPMContext wctx,
                   ApplicationContext appCtx,
                   java.lang.String appRoleName,
                   boolean force)
                   throws BPMOrganizationException
Deletes an app role from the policy store

Parameters:
wctx - an authenticated IBPMContext
appCtx - The application context from which the appRole has to be deleted
appRoleName - The name of the appRole which will be deleted
force -
Throws:
BPMOrganizationException

grantAppRoleToPrincipal

void grantAppRoleToPrincipal(IBPMContext wctx,
                             ApplicationContext appCtx,
                             java.lang.String approleName,
                             Participant participant)
                             throws BPMOrganizationException
Grants an appRole to the specified Principal

Parameters:
wctx - an authenticated IBPMContext
appCtx - The application context
appRole - AppRole object to be granted
participants - Participant objects to which the appRole has to be granted
Throws:
BPMOrganizationException

revokeAppRoleFromPrincipal

void revokeAppRoleFromPrincipal(IBPMContext wctx,
                                ApplicationContext appCtx,
                                java.lang.String approleName,
                                Participant participant)
                                throws BPMOrganizationException
Revokes an appRole from the specified Principal

Parameters:
wctx - an authenticated IBPMContext
appCtx - The application context
appRole - AppRole object to be revoked
participants - Participant objects from which the appRole has to be revoked
Throws:
BPMOrganizationException

grantPermissionToAppRole

void grantPermissionToAppRole(IBPMContext wctx,
                              ApplicationContext appCtx,
                              java.lang.String approleName,
                              Permission perm)
                              throws BPMOrganizationException
Grants Permission to AppRole

Parameters:
wctx - an authenticated IBPMContext
appCtx - The application context
appRole - AppRole object to be granted the permission
perm - Permission object which has to be granted to the appRole
Throws:
BPMOrganizationException

revokePermissionFromAppRole

void revokePermissionFromAppRole(IBPMContext wctx,
                                 ApplicationContext appCtx,
                                 java.lang.String approleName,
                                 Permission perm)
                                 throws BPMOrganizationException
Revokes the permission from an AppRole

Parameters:
wctx - an authenticated IBPMContext
appCtx - The application context
appRole - AppRole object from which the permission is revoked
perm - Permission object which has to be revoked
Throws:
BPMOrganizationException

createApplicationRoleOrgUnitCalendarAssociation

ApplicationRoleOrgUnitCalendarAssociation createApplicationRoleOrgUnitCalendarAssociation(IBPMContext ctx,
                                                                                          ApplicationRoleOrgUnitCalendarAssociation applicationRoleOrgUnitCalendarAssociation)
                                                                                          throws BPMOrganizationException
createApplicationRoleOrgUnitCalendarAssociation API can be used to create a mapping between ApplicationRole, OrganizationalUnit, and CalendarRule. This mapping defines the CalendarRule associated with an ApplicationRole in a given OrganizationalUnit. If applicationRoleOrgUnitCalendarAssociationId is populated it will be used otherwise an id will be generated for it.

Parameters:
ctx - the workflow context
applicationRoleOrgUnitCalendarAssociation - the ApplicationRoleOrgUnitCalendarAssociation to be created
Returns:
the created ApplicationRoleOrgUnitCalendarAssociation
Throws:
BPMOrganizationException - any exception thrown during the creation

updateApplicationRoleOrgUnitCalendarAssociation

ApplicationRoleOrgUnitCalendarAssociation updateApplicationRoleOrgUnitCalendarAssociation(IBPMContext ctx,
                                                                                          ApplicationRoleOrgUnitCalendarAssociation applicationRoleOrgUnitCalendarAssociation)
                                                                                          throws BPMOrganizationException
updateApplicationRoleOrgUnitCalendarAssociation API can be used to update the Calendar and OrganizationalUnit of this association. ApplicationRole cannot be changed in this association.

Parameters:
ctx - the workflow context
applicationRoleOrgUnitCalendarAssociation - the ApplicationRoleOrgUnitCalendarAssociation that contains the updated information
Returns:
boolean true if update succeeded, otherwise false
Throws:
BPMOrganizationException - any exception thrown during the update

deleteApplicationRoleOrgUnitCalendarAssociation

void deleteApplicationRoleOrgUnitCalendarAssociation(IBPMContext ctx,
                                                     java.lang.String applicationRoleOrgUnitCalendarAssociationId)
                                                     throws BPMOrganizationException
deleteApplicationRoleOrgUnitCalendarAssociation API can be used to delete an ApplicationRoleOrgUnitCalendarAssociation.

Parameters:
ctx - the workflow context
applicationRoleOrgUnitCalendarAssociationId - the applicationRoleOrgUnitCalendarAssociationId String value of the ApplicationRoleOrgUnitCalendarAssociation to be deleted
Throws:
BPMOrganizationException - any exception thrown during deletion

getApplicationRoleOrgUnitCalendarAssociation

java.util.List<ApplicationRoleOrgUnitCalendarAssociation> getApplicationRoleOrgUnitCalendarAssociation(IBPMContext ctx,
                                                                                                       RoleProfile applicationRole)
                                                                                                       throws BPMOrganizationException
getApplicationRoleOrgUnitCalendarAssociation API can be used to retrieve all the ApplicationRoleOrgUnitCalendarAssociation for the given Application Role

Parameters:
ctx - the workflow context
applicationRole - the RoleProfile that defines the ApplicationRole
Returns:
List of ApplicationRoleOrgUnitCalendarAssociation
Throws:
BPMOrganizationException - any exception thrown during query

exportOrganization

Organization exportOrganization(IBPMContext ctx)
                                throws BPMOrganizationException
exportOrganization API can be used to obtain the entire Organization, which consists of a hierarchy of OrganizationalUnits, ApplicationRoleOrgUnitCalendarAssociations, HolidayRules, Calendar Rules, Extended user properties, etc.

Parameters:
ctx - the workflow context
Returns:
the entire Organization
Throws:
BPMOrganizationException - any exception thrown during export

importOrganization

Organization importOrganization(IBPMContext ctx,
                                Organization organization,
                                boolean validateUsers)
                                throws BPMOrganizationException
importOrganization API can be used to import an entire Organization, which consists of a hierarchy of OrganizationalUnits, ApplicationRoleOrgUnitCalendarAssociations, HolidayRules, Calendar Rules, Extended user properties, etc. Only new entities will be added. Existing entities will be ignored.

Parameters:
ctx - the workflow context
organization - Organization to be imported
validateUsers - if true, users in hte orgUnits will be validated against the LDAP
Returns:
Organization - Contains all the failed entries during import.
Throws:
BPMOrganizationException - any exception thrown during import

Oracle Fusion Middleware
Java API Reference for Oracle BPM Suite
11g Release 1 (11.1.1.7.0)
E25378-07

Copyright © 2009, 2013, Oracle and/or its affiliates. All rights reserved.