API Methods
1. postFeed
USAGE: postFeed(List<ID> parents, String message, String url (optional),List<String> topics (optional),List<ID> mentions (optional))
Description: posts feed to object chatter
Return Value: none
EXAMPLE:
new WR_BPM.API().call('ChatterService', 'postFeed', new Map<String, Object>{
'parents' => array of users/objects ids
'message' => feed body
'url' => url that will be added to the body
'topics' => array of topics titles
'mentions' => array of users ids that will be mentioned in the feed
});
2. postComment
USAGE: postComment(ID feedId, String message)
Description: posts comment to the specified feed
Return Value: none
EXAMPLE:
new WR_BPM.API().call('ChatterService', 'postComment', newMap<String, Object>{
'feedId' => id of chatter feed,
'message' => comment body
});
See related article: Chatter API Methods.
3. setDisabled
USAGE: setDisabled(Boolean Value)
Description: disables posting feeds to any (task, process and object) chatter
Return Value: none
- This method is used in Process Step Actions to temporary disable posting. This action does the same as "Enable Chatter Notifications" and "Enable Object Notifications" step properties set to "Yes", but can be executed with conditions (in comparison with properties above, that are executed always).
- This method when executed disables posting in one request only. Other steps posts will not be affected by it.
- If execute this action with Start Type = Before Step, a feed notifications will be disabled for that step. If set Start Type = After Step, this action will disable notifications about the subsequent step.
- Note, that subsequent step posts can still be made from other preceding step that has no such action set.
EXAMPLE:
new WR_BPM.API().call('ChatterService', 'setDisabled', true|false);
1. sendEmailAlert
USAGE: sendEmailAlert(String alertType, List<String>toList, String subject, String body)
Description: sends email alert
Return Value: none
EXAMPLE:
new WR_BPM.API().call('EmailMessageService', 'sendEmailAlert', new Map<String, Object>{
'alertType' => 'Generic Notification',
'toList' => new List<String>{'[email protected]'}, // list of email addresses
'subject' => 'subject',
'body' => 'body'
});
2. sendEmailMessage
USAGE: sendEmailMessage(List<String>to, String subject, String body, String fromName, Boolean plainText, List<Attachment>attachments)
Description: sends email with attachments
Return Value: none
EXAMPLE:
new WR_BPM.API().call('EmailMessageService', 'sendEmailMessage', new Map<String, Object>{
'to' => new List<String>{'[email protected]'}, // list of email addresses
'subject' => 'subject',
'body' => 'body',
'fromName' => 'fromName', // value that will be displayed as the sender's name
'plainText' => true/false,
'attachments' => new List<Attachment>()
});
3. sendEmailMessageByTemplate
USAGE: sendEmailMessageByTemplate(List<String>to, ID templateId, ID recordId, String fromName)
Description: sends email using SalesForce email template
Return Value: none
EXAMPLE:
new WR_BPM.API().call('EmailMessageService', 'sendEmailMessageByTemplate', new Map<String, Object>{
'to' => newList<String>{'[email protected]'}, // list of email addresses
'templateId' => 'SalesForce email template Id',
'recordId' => 'template source record Id',
'fromName' => 'fromName' // value that will be displayed as the sender's name
});
NOTE: sendEmailMessageByTemplate API will only work when Email Delivery Contact is set on Work Relay Settings:
1. getDateFormat
USAGE: getDateFormat();
Description: returns date format from WorkRelay config settings
Return Value: Object
EXAMPLE:
new WR_BPM.API().call('ConfigService', 'getDateFormat', null);
2. getDateTimeFormat
USAGE: getDateTimeFormat();
Description: returns dateTime format from WorkRelay config settings
Return Value: Object
EXAMPLE:
new WR_BPM.API().call('ConfigService', 'getDateTimeFormat', null);
3. getNamespace
USAGE: getNamespace();
Description: returns Namespace from WorkRelay config settings
Return Value: Object
EXAMPLE:
new WR_BPM.API().call('ConfigService', 'getNamespace', null);
1. executeAction
USAGE: executeAction(ID actionId, String source (optional), Map<String, Object> variables (optional))
Description: executes specified Global Action
Return Value: Object (Global Action Context)
EXAMPLE:
new WR_BPM.API().call('GlobalActionService', 'executeAction', new Map<String, Object>{
'actionId' => 'global action ID',
'source' => 'global action source record ID', //required if option has a source object
'variables' => new Map<String, Object>{'variable_name' => 'variable_value'}
});
2. executeActionGroup
USAGE: executeActionGroup(ID groupId, String source (optional), Map<String, Object> variables (optional))
Description: executes Global Action group.
Return Value: Object (Global Action Context)
EXAMPLE:
new WR_BPM.API().call('GlobalActionService', 'executeActionGroup', new Map<String, Object>{
'groupId' => 'global action group id',
'source' => 'global action group source object', //required if global action group has a source object
'variables' => new Map<String, Object>{'variable_name' => 'variable_value'}
});
3. executeInBatch
USAGE: executeInBatch(String query, ID actionOrGroupId, IDfinishActionOrGroupId(optional), Boolean passSource (optional), Map<String, Object> variables (optional), Integer batchSize (optional), Boolean inSingleCall (optional))
Description: starts Salesforce batch job and executes Global Action for each batch record.
Return value: Id (Apex Job Id)
EXAMPLE:
new WR_BPM.API().call('GlobalActionService', 'executeInBatch', new Map<String, Object>{
'query' => query to get records, // e.g. 'select id from account limit 5'
'actionOrGroupId' => ID of the action or action group,
'finishActionOrGroupId' => ID of the action or action group that will be executed in the end of the batch,
'passSource' => true/false //if "true" the current record will be passed to the action/group as the source object, otherwise current record id will be available in the action as {$Variables.recordId},
'variables' => new Map<String, Object>{'variable_name' => 'variable_value'},
'batchSize' => size of batch iteration,
'inSingleCall' => true/false //if "true" executes action once for loaded records - this way records ids will be available in {$Environment.ids}
});
4. executeInScheduler
USAGE: executeInScheduler(String name,String cron, String query, ID actionOrGroupId, String source (optional), Map<String, Object> variables (optional))
Description: method initiates Salesforce scheduled job and executes Global Action for each scheduled job execution.
Return Value: Id (Apex Job Id)
EXAMPLE:
new WR_BPM.API().call('GlobalActionService', 'executeInScheduler, new Map<String, Object>{
'name' =>The name of the scheduled job,
'cron' =>The CRON configuration for the scheduled job,
'actionOrGroupId' => The ID of the action or action group,
'source' => The ID of the source record,
'variables' => new Map<String, Object>{'variable_name' => 'variable_value'}
});
1. startWorfkflow
USAGE: startWorkflow(String flowId, String recordId, Map<String, Object> variables (optional))
Description: starts specified process version by flow id
Return Value: List<Flow_Instance__c>
EXAMPLE:
new WR_BPM.API().call('WorkflowActivator', 'startWorkflow', new Map<String, Object>{
'flowId' => process version id
'recordId' => process context object id
'variables' => new Map<String, Object>{'variable_name' => 'variable_value'} // initial variables
});
2. startWorkflowByFlowName
USAGE: startWorkflowByFlowName(String flowName, String recordId, Map<String, Object> variables (optional))
Description: starts specified process version by version name
Return Value: List<Flow_Instance__c>
EXAMPLE:
new WR_BPM.API().call('WorkflowActivator', 'startWorkflowByFlowName', new Map<String, Object>{
'flowName' => process version name,
'recordId' => process context version id,
'variables' => new Map<String, Object>{'variable_name' => 'variable_value'}
});
3. startWorkflowByProcessName
USAGE: startWorkflowByProcessName(String processName, String recordId, Map<String, Object> variables (optional))
Description: starts primary version of a specified process by process name
Return Value: List<Flow_Instance__c>
EXAMPLE:
new WR_BPM.API().call('WorkflowActivator', 'startWorkflowByProcessName', new Map<String, Object>{
'processName' => The process name,
'recordId' => SObject.Id,
'variables' => new Map<String, Object>{'variable_name' => 'variable_value'}
});
4. setDisabled
USAGE: setDisabled(Boolean value)
Description: disables logic, that starts processes. Works only within one request.
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowActivator', 'setDisabled', true|false);
5. setIgnoreFLows
USAGE: setIgnoreFlows(String value)
Description: defines flows, that should be ignored by the logic that starts processes. Works only within one request.
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowActivator', 'setIgnoreFlows', '["flowId_1", "flowId_2",....]');
6. setIgnoreRecords
USAGE: setIgnoreRecords(String value)
Description: defines SObject records, that should be ignored by the logic that starts processes. Works only within one request.
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowActivator', 'setIgnoreRecords', '["recordId_1", "recordId_2", ....]');
7. setCheckOnlyFlows
USAGE: setCheckOnlyFlows(String value
)
Description: defines flows, that should be checked by the logic that starts processes. All other flows will be ignored. Works only within one request.
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowActivator', 'setCheckOnlyFlows', '["flowId_1", "flowId_2", ....]');
8. setNewInstancesLimit
USAGE: setNewInstancesLimit(String value)
Description: sets the limit of maximum number of process instances that could be started for the current request.
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowActivator', 'setNewInstancesLimit', 10);
1. completeStep
USAGE: completeStep(String cursorId, String operation, String comments (optional), Date startDate (optional), Date completeDate (optional), Map<String,Object> environment(optional))
Description: executes proceed of the process step. If proceed operation requires a new transaction, the method will throw WR_BPM.LimitsException.
Return Value: Boolean //if proceed executed successfully
EXAMPLE:
new WR_BPM.API().call('WorkflowProceedService', 'completeStep', new Map<String, Object>{
'cursorId' => Flow_Instance_Cursor__c.Id,
'operation' => 'Proceed|Approve|Reject',
'comments' => 'Some Comment',
'startDate' => Actual Start DateTime,
'completeDate' => Actual End DateTime,
'environment' => new Map<String,Object>{'name' => 'value'} //values that can be used via process {$Environment} while step proceeding
});
2. completeStep
USAGE: completeStep(Flow_Instance_Cursor__c flowInstanceCursor, String operation, String comments (optional), Date startDate (optional), Date completeDate (optional))
Description: executes proceed of the process step. If proceed operation requires a new transaction, the method will throw WR_BPM.LimitsException.
Return Value: Boolean //if proceed executed successfully
EXAMPLE:
new WR_BPM.API().call('WorkflowProceedService', 'completeStep', new Map<String, Object>{
'flowInstanceCursor' => Flow_Instance_Cursor__c,
'operation' => 'Proceed|Approve|Reject',
'comments' => 'Some Comment',
'startDate' => Actual Start DateTime,
'completeDate' => Actual End DateTime,
'environment' => new Map<String,Object>{'name' => 'value'} //values that can be used via process {$Environment} while step proceeding
});
3. completeParentStep
USAGE: completeParentStep(String cursorId, String operation, String comments (optional), Date startDate (optional), Date completeDate (optional))
Description: executes proceed of the parent process step. If proceed operation requires a new transaction, the method will throw WR_BPM.LimitsException.
Return Value: Boolean //if proceed executed successfully
EXAMPLE:
new WR_BPM.API().call('WorkflowProceedService', 'completeParentStep', new Map<String, Object>{
'cursorId' => Flow_Instance_Cursor__c.Id,
'operation' => 'Proceed|Approve|Reject',
'comments' => 'Some Comment',
'startDate' => Actual End DateTime,
'completeDate' => Actual End DateTime
});
4. completeStepAsync
USAGE: completeStepAsync(String flowInstanceCursorId, String operation, String stepId (optional), String comments (optional), String stepId, Date startDate (optional), Date completeDate (optional))
Description: executes proceed of the process step in async manner
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowProceedService', 'completeStepAsync', new Map<String, Object>{
'cursorId' => Flow_Instance_Cursor__c.Id,
'operation' => 'Proceed|Approve|Reject',
'stepId' => Flow_Instance_Cursor__c.Step__c,
'comments' => 'Some Comment',
'startDate' => Actual Start DateTime,
'completeDate' => Actual End DateTime
});
1. activateFlowInstances
USAGE: activateFlowInstances(String instancesIds, Boolean flag, Boolean withSubProcesses)
Description: activates/deactivates specified flow instances
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'activateFlowInstances', new Map<String, Object>{
'instancesIds' => "["instanceId_1","instanceId_2", ...]",
'flag' => true/false, // use true to activate instances, false to deactivate them
'withSubProcesses' => true/false // use true to activate instances along with their subprocesses
});
2. changeAssignee
USAGE: changeAssignee(String cursorId, String assigneeType, String assignee)
Description: changes assignee of the specified cursor
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'changeAssignee', new Map<String, Object>{
'cursorId' => Flow_Instance_Cursor__c.Id,
'assigneeType' => User/Group/Role/Profile/System, //pick one
'assignee' => ids in JSON array format or 'System' if assigneeType is System
});
3. changeDuration
USAGE: changeDuration(String cursorId, String duration)
Description: sets duration on the specified task
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'changeDuration', new Map<String, Object>{
'cursorId' => Flow_Instance_Cursor__c.Id,
'duration' => '1d 2h 30m' // [1d 1h 1m] format
});
4. refreshDuration
USAGE: refreshDuration(String cursorId)
Description: recalculates duration for an active step (cursor)
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'refreshDuration', new Map<String, Object>{
'cursorId' => Flow_Instance_Cursor__c.Id
});
5. changeFlowStep
USAGE: changeFlowStep(String cursorId, String targetStepId, Boolean complete)
Description: moves cursor to the specified process step
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'changeFlowStep', new Map<String, Object>{
'cursorId' => Flow_Instance_Cursor__c.Id,
'targetStepId' => Flow_Step_Junction__c.Id,
'complete' => false // if set to true method will complete instance
});
6. changeStartDateConfig
USAGE: changeStartDateConfig(String cursorId, String startDateConfig)
Description: sets start date config on the specified cursor based on the WR business hours setting
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'changeStartDateConfig',new Map<String, Object>{
'cursorId' => Flow_Instance_Cursor__c.Id,
'startDateConfig' => String.valueOf(system.today() +1) // pass empty string to remove start date config from cursor
});
7. cloneInstance
USAGE: cloneInstance(String instanceId, String recordId)
Description: clones existing flow instance and relates it to the specified record
Return Value: Flow_Instance__c (new flow instance record)
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'cloneInstance',new Map<String, Object>{
'instanceId' => Flow_Instance__c.Id,
'recordId' => context record id to relate new flow instance to
});
8. migrateFlowInstances
USAGE: migrateFlowInstances(String sourceFlowId, String targetFlowId, String instances, String stepsMapping (Optional))
Description: migrates flow instances from source flow to target flow considering flow mapping. Migrated flow instances have Inactive state. Flow instances on source flow are not removed.
Return Value: List<Flow_Instance__c> - migrated flow instances list
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'migrateFlowInstances', new Map<String, Object>{
'sourceFlowId' => Flow__c.Id, // source flow id
'targetFlowId' => Flow__c.Id, // target flow id
'instances' => 'select id from wr_bpm__flow_instance__c where id in ( \'instanceId_1\', \'instanceId_2\')', // SOQL query or Ids in JSON array format.
'stepsMapping' => The JSON object in format {"SOURCE_STEP_ID OR SOURCE_STEP_NAME":"TARGET_STEP_ID OR TARGET_STEP_NAME", ...}, // optional
'keepHistory' => true OR false // optional; defaults to false
});
9. reactivateReminders
USAGE: reactivateReminders(String cursorId, List<ID> remindersIds)
Description: reactivates inactive reminders i.e. ones were already executed
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'reactivateReminders', new Map<String, Object>{
'cursorId' => Flow_Instance_Cursor__c.Id,
'remindersIds' => new List<ID>{'reminderId_1', 'reminderId_2'}
});
10. reactivateEscalations
USAGE: reactivateEscalations(String cursorId, List<ID> escalationsIds)
Description: reactivates inactive escalations i.e. ones were already executed
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'reactivateEscalations', new Map<String, Object>{
'cursorId' => Flow_Instance_Cursor__c.Id,
'escalationsIds' => new List<ID>{'escalationId_1', 'escalationId_2'}
});
11. restartCursor
USAGE: restartCursor(ID cursorId)
Description: restarts flow instance cursor
Return Value: Flow_Instance_Cursor__c
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'restartCursor', Flow_Instance_Cursor__c.Id);
12. restartBranch
USAGE: restartBranch(ID instanceId, ID branchId)
Description: restarts flow instance branch
Return Value: Flow_Instance_Cursor__c
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'restartBranch', new Map<String,Object>{
'instanceId' => Flow_Instance__c.Id,
'branchId' => Flow_Branch__c.Id
});
13. restartInstance
USAGE: restartInstance(ID instanceId, Boolean keepHistory)
Description: restarts flow instance
Return Value: Flow_Instance__c
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'restartInstance', new Map<String,Object>{
'instanceId' => Flow_Instance__c.Id,
'keepHistory' => true/false //will keep process history after restarting instance if set to 'true'
});
14. terminateCursor
USAGE: terminateCursor(ID cursorId, ID stepId)
Description: completes flow instance cursor
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'terminateCursor', new Map<String,Object>{
'cursorId' => Flow_Instance_Cursor__c.Id,
'stepId ' => Flow_Step_Junction__c.Id
});
15. terminateInstance
USAGE: terminateInstance(ID instanceId, Boolean withSubProcesses, String comments)
Description: completes flow instance. Can also complete subprocess instances
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'terminateInstance', new Map<String,Object>{
'instanceId' => Flow_Instance__c.Id,
'withSubProcesses ' => true/false, // (will also complete subprocess instances if set to true
'comments' => user comments
});
16. throwException
USAGE: throwException(String message)
Description: throws WR_BPM.GenericException
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'throwException', 'Message...');
17. updateActualDates
USAGE: updateActualDates(String cursorOrHistoryId, Object startDate, Object endDate)
Description: updates actual dates on flow instance history
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'updateActualDates', new Map<String,Object>{
'cursorOrHistoryId' => ID of flow instance cursor or flow instance history,
'startDate' => dateTime or 'IGNORE' if date should not be updated,
'completeDate' => dateTime or 'IGNORE' if date should not be updated
});
18. updateManagers
USAGE: updateManagers(ID instanceId, String managers)
Description: updates managers on specified flow instance
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'updateManagers', new Map<String,Object>{
'instanceId' => Flow_Instance__c.Id,
'managers' => '["user1_ID", "user2_ID", ....]'
});
19. updateProcessingFrequency
USAGE: updateProcessingFrequency(String cursorsIds, Integer frequency)
Description: updates processing frequency for specified cursors
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'updateProcessingFrequency', new Map<String,Object>{
'cursorsIds' => '["cursorId_1", "cursorId_2", ...]',
'frequency' => -1 / 0 / 4 / 8 / 12 / 24 / 48 //integer value of hours
});
20. updateProcessingFrequencyByObjectsAndSteps
USAGE: updateProcessingFrequencyByObjectsAndSteps(String objectStepMap, Integer frequency)
Description: updates processing frequency for cursors based on object id and steps ids
Return Value: none
EXAMPLE:
new WR_BPM.API().call('WorkflowService', 'updateProcessingFrequencyByObjectsAndSteps', new Map<String,Object>{
'objectStepMap' => JSON object in format '{"object_id":["step_id", ...]}'
'frequency' => -1 / 0 / 4 / 8 / 12 / 24 / 48 //integer value of hours
});
1. updateVariable
USAGE: updateVariable(String instanceId, String name, Object value)
Description: updates single variable on specified flow instance. If there is no specified variable on flow instance, method would create new variable.
Return Value: none
EXAMPLE:
new WR_BPM.API().call('VariableService', 'updateVariable', new Map<String, Object>{
'instanceId' => Flow_Instance__c.Id,
'name' => 'variable_name',
'value' => {SOME_VALUE}
});
2. updateVariables
USAGE: updateVariables(String instanceId, Map<String, Object> variables)
Description: updates multiple variables on specified flow instance. If there are no specified variables on flow instance, method would create new variables.
Return Value: none
EXAMPLE:
new WR_BPM.API().call('VariableService', 'updateVariables', new Map<String, Object>{
'instanceId' => Flow_Instance__c.Id,
'variables' => new Map<String, Object>{'variable_name' => {SOME_VALUE}}
});
3. updateVariablesByInstances
USAGE: updateVariablesByInstances(List<String> instancesIds, Map<String, Object> variables)
Description: updates multiple variables on specified flow instances.
Return Value: none
EXAMPLE:
new WR_BPM.API().call('VariableService', 'updateVariables', new Map<String, Object>{
'instancesIds' => List<String>{Flow_Instance__c.Id}, //flow instances ids
'variables' => new Map<String, Object>{'variable_name' => {SOME_VALUE}}
});
1. recalculateGanttProperties
USAGE: recalculateGanttProperties(ID flowId, ID recordId, ID stepId, DateTime date)
Description: recalculates dates on process step based on flow and record ids
Return Value: none
EXAMPLE:
new WR_BPM.API().call('FlowGanttService', 'recalculateGanttProperties', new Map<String, Object>{
'flowId' => The flow ID,
'recordId' => The record ID,
'stepId' => The step ID,
'date' => The date/time when recalculation will be executed
});
2. recalculateGanttPropertiesByInstance
USAGE: recalculateGanttPropertiesByInstance(ID instanceId, ID stepId, DateTime date)
Description: recalculates dates on process step based on instance id
Return Value: none
EXAMPLE:
new WR_BPM.API().call('FlowGanttService', 'recalculateGanttPropertiesByInstance', new Map<String, Object>{
'instanceId' => The process instance ID,
'stepId' => The step ID,
'date' => The date/time when recalculation will be executed
});
1. lock
USAGE: lock(String ids, Boolean allOrNothing)
Description: locks Sales Force record. Uses object Approval Process.
Return Value: Approval.LockResult
EXAMPLE:
new WR_BPM.API().call('SFWorkflowService', 'lock', new Map<String, Object>{
'ids' => record ids in JSON format,
'allOrNothing' => Boolean specifying whether this operation allows partial success. If you specify false and a record fails, the remainder of the DML operation can still succeed
});
2. unlock
USAGE: unlock(String ids, Boolean allOrNothing)
Description: unlocks Sales Force record. Uses object Approval Process.
Return Value: Approval.LockResult
EXAMPLE:
new WR_BPM.API().call('SFWorkflowService', 'lock', new Map<String, Object>{
'ids' => record ids in JSON format,
'allOrNothing' => Boolean specifying whether this operation allows partial success. If you specify false and a record fails, the remainder of the DML operation can still succeed
});
3. startFlow
USAGE: startFlow(String namespace, String flowName, String variables)
Description: starts sales force flow
Return Value: Flow.Interview
EXAMPLE:
new WR_BPM.API().call('SFWorkflowService', 'startFlow', new Map<String,Object>{
'namespace' => organization namespace, optional,
'flowName' => Sales Force flow name,
'variables' => JSON object
});
1. addLicenseUser
USAGE: addLicenseUser(String license, String user ID)
Description: adds License to a specified single user
Return Value: WR_BPM__License_User__c object
EXAMPLE:
new WR_BPM.API().call('LicenseService', 'addLicenseUser', new Map<String, Object>{
'license' => The license Id or Name,
'userId' => user ID
});
2. removeLicenseUser
USAGE: removeLicenseUser(String license, String user ID)
Description: revokes License from a specified single user
EXAMPLE:
new WR_BPM.API().call('LicenseService', 'removeLicenseUser', new Map<String, Object>{
'license' => The license Id or Name,
'userId' => user ID
});
3. addLicenseUsers
USAGE: addLicenseUsers(String license, String user IDs)
Description: adds License to a specified set of users
Return Value: WR_BPM__License_User__c object
EXAMPLE:
new WR_BPM.API().call('LicenseService', 'addLicenseUsers', new Map<String, Object>{
'license' => The license Id or Name,
'usersIds' => The users Ids in JSON array format
});
4. removeLicenseUsers
USAGE: removeLicenseUsers(String license, String user IDs)
Description: revokes Licenses from a specified set of users
EXAMPLE:
new WR_BPM.API().call('LicenseService', 'removeLicenseUsers', new Map<String, Object>{
'license' => The license Id or Name,
'usersIds' => The users Ids in JSON array format
});
0 Comments
Add your comment