mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
[AAE-4924]Add method for createProcess with variables (#6897)
* Add methos for createProcess with variables * Exclude test due to bug
This commit is contained in:
parent
37b10ecb8f
commit
39255ab02f
@ -3,5 +3,6 @@
|
||||
"C260051": "login problem APS not basic",
|
||||
"C279932": "login problem APS not basic",
|
||||
"C279931": "login problem APS not basic",
|
||||
"C279930": "login problem APS not basic"
|
||||
"C279930": "login problem APS not basic",
|
||||
"C593560": "https://alfresco.atlassian.net/browse/ADF-5366"
|
||||
}
|
||||
|
@ -58,6 +58,17 @@ export class ProcessServices {
|
||||
return processInstance;
|
||||
}
|
||||
|
||||
async createProcessInstanceWithVariables(processDefName, appName, variables: any, processInstanceName?: string) {
|
||||
const processDefinition = await this.processDefinitionsService.getProcessDefinitionByName(processDefName, appName);
|
||||
const processInstance = await this.processInstancesService.createProcessInstance(processDefinition.entry.key, appName, {
|
||||
name: processInstanceName ? processInstanceName : StringUtil.generateRandomString(),
|
||||
businessKey: StringUtil.generateRandomString(),
|
||||
variables: variables
|
||||
});
|
||||
|
||||
return processInstance;
|
||||
}
|
||||
|
||||
async waitForStatus(processInstanceId: string, appName: string, expectedStatus: string): Promise<any> {
|
||||
const predicate = (result: any) => {
|
||||
Logger.info(`Process instance ${processInstanceId} status found: ${result.entry.status}`);
|
||||
|
Loading…
x
Reference in New Issue
Block a user