Commit b720aded authored by Francesco Corti's avatar Francesco Corti

Changes for MALFD-59.

parent 894548fd
......@@ -75,7 +75,7 @@ The [General](/postman/my.alfresco.com%20decommission%20-%20General.postman_coll
The [Process instances creation](/postman/my.alfresco.com%20decommission%20-%20Process%20instances%20creation.postman_collection.json) is about massively creating process instances.
The massive creation is done using the `Run` option of the collection.
Into the setup, use the [`salesforce_ids.json`](/postman/salesforce_ids.json) file that lists the salesforceId.
Into the setup, use the [`salesforce_ids.json`](/postman/salesforce_ids.json) file that lists the cloudTenantId.
The [`salesforce_ids.json`](/postman/salesforce_ids.json) is created from the Excel Sheet of the project.
......@@ -33,7 +33,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"processDefinitionId\": \"{{processDefinitionId}}\",\n \"variables\": [\n {\n \"name\": \"salesforceId\",\n \"value\": \"{{salesforceId}}\"\n }\n ]\n}"
"raw": "{\n \"processDefinitionId\": \"{{processDefinitionId}}\",\n \"variables\": [\n {\n \"name\": \"cloudTenantId\",\n \"value\": \"{{cloudTenantId}}\"\n }\n ]\n}"
},
"url": {
"raw": "{{aps}}/activiti-app/api/enterprise/process-instances",
......
This diff is collapsed.
......@@ -12,7 +12,6 @@ import com.activiti.testutils.resources.AlfrescoResourceProperties;
import com.activiti.testutils.resources.MyAlfrescoComDecommissionResourceProperties;
import com.activiti.testutils.resources.ProcessUtil;
import com.activiti.testutils.resources.RestUtil;
import com.activiti.testutils.resources.SpreadsheetUtil;
public class BulkExportJavaDelegate implements JavaDelegate {
......
......@@ -30,9 +30,9 @@ public class SalesforceInquiryJavaDelegate implements JavaDelegate {
@Override
public void execute(DelegateExecution execution) throws Exception {
logger.info("Getting the 'salesforceId' variable.");
String salesforceId = (String) execution.getVariable(ProcessUtil.SALESFORCE_CUSTOMER_ID_VARIABLE);
logger.info("'salesforceId'='" + salesforceId + "'.");
logger.info("Getting the 'cloudTenantId' variable.");
String cloudTenantId = (String) execution.getVariable(ProcessUtil.CLOUD_TENANT_ID_VARIABLE);
logger.info("'cloudTenantId'='" + cloudTenantId + "'.");
logger.info("Getting myAlfrescoComDecommissionResourceProperties.");
myAlfrescoComDecommissionResourceProperties = new MyAlfrescoComDecommissionResourceProperties();
......@@ -41,8 +41,8 @@ public class SalesforceInquiryJavaDelegate implements JavaDelegate {
logger.info("Getting the SalesForce spreadsheet.");
Sheet sheet = SpreadsheetUtil.getSheet(new File(getClass().getClassLoader().getResource(myAlfrescoComDecommissionResourceProperties.getProperty(MyAlfrescoComDecommissionResourceProperties.SALESFORCE_SPREADSHEET_FILE_NAME)).getFile()), SpreadsheetUtil.SALESFORCE_SHEET_NUMBER);
logger.info("Getting the row with column '" + SpreadsheetUtil.SALESFORCE_CUSTOMER_ID_COLUMN_DESCRIPTION + "'='" + salesforceId + "'.");
Row customerRow = SpreadsheetUtil.getUniqueRow(sheet, SpreadsheetUtil.SALESFORCE_CUSTOMER_ID_COLUMN_DESCRIPTION, salesforceId);
logger.info("Getting the row with column '" + SpreadsheetUtil.CLOUD_TENANT_ID_COLUMN_DESCRIPTION + "'='" + cloudTenantId + "'.");
Row customerRow = SpreadsheetUtil.getUniqueRow(sheet, SpreadsheetUtil.CLOUD_TENANT_ID_COLUMN_DESCRIPTION, cloudTenantId);
logger.info("Getting the column index with description '" + SpreadsheetUtil.CUSTOMER_TENANT_COLUMN_DESCRIPTION + "'.");
int columnIndex = SpreadsheetUtil.getColumnIndex(sheet, SpreadsheetUtil.CUSTOMER_TENANT_COLUMN_DESCRIPTION);
......
......@@ -2,7 +2,7 @@ package com.activiti.testutils.resources;
public class ProcessUtil {
public static String SALESFORCE_CUSTOMER_ID_VARIABLE = "salesforceId";
public static String CLOUD_TENANT_ID_VARIABLE = "cloudTenantId";
public static String MY_ALFRESCO_COM_TENANT_VARIABLE = "myAlfrescoComTenant";
public static String CUSTOMER_TYPE_VARIABLE = "customerType";
public static String MY_ALFRESCO_COM_GB_VARIABLE = "myAlfrescoComGB";
......
......@@ -13,7 +13,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
public class SpreadsheetUtil {
public static int SALESFORCE_SHEET_NUMBER = 1;
public static String SALESFORCE_CUSTOMER_ID_COLUMN_DESCRIPTION = "CloudTenantID";
public static String CLOUD_TENANT_ID_COLUMN_DESCRIPTION = "CloudTenantID";
public static String SALESFORCE_CSM_COLUMN_DESCRIPTION = "CSM User";
public static String CUSTOMER_GB_COLUMN_DESCRIPTION = "GB USED";
public static String CUSTOMER_TENANT_COLUMN_DESCRIPTION = "Cloud Tenant Domain";
......
{"name":"MyAlfrescoCom decommission","description":"","definition":{"models":[{"id":7,"name":"MyAlfrescoDecommission - Test case 2","version":8,"modelType":0,"description":"","stencilSetId":0,"createdByFullName":" Administrator","createdBy":1,"lastUpdatedByFullName":" Administrator","lastUpdatedBy":1,"lastUpdated":"2018-08-27T11:47:09.587+0000"},{"id":8,"name":"MyAlfrescoCom decommission","version":8,"modelType":0,"description":"","stencilSetId":0,"createdByFullName":" Administrator","createdBy":1,"lastUpdatedByFullName":" Administrator","lastUpdatedBy":1,"lastUpdated":"2018-08-27T11:47:09.663+0000"},{"id":6,"name":"MyAlfrescoDecommission - Test case 1","version":8,"modelType":0,"description":"","stencilSetId":0,"createdByFullName":" Administrator","createdBy":1,"lastUpdatedByFullName":" Administrator","lastUpdatedBy":1,"lastUpdated":"2018-08-27T11:47:09.742+0000"}],"theme":"theme-1","icon":"glyphicon-asterisk","publishIdentityInfo":[{"type":"user","person":{"id":2,"firstName":"Francesco","lastName":"Corti","email":"francesco@alfresco.com","company":"Alfresco"},"group":null}]}}
\ No newline at end of file
{"name":"MyAlfrescoCom decommission","description":"","definition":{"models":[{"id":7,"name":"MyAlfrescoDecommission - Test case 2","version":9,"modelType":0,"description":"","stencilSetId":0,"createdByFullName":" Administrator","createdBy":1,"lastUpdatedByFullName":" Administrator","lastUpdatedBy":1,"lastUpdated":"2018-12-10T19:53:25.215+0000"},{"id":8,"name":"MyAlfrescoCom decommission","version":9,"modelType":0,"description":null,"stencilSetId":0,"createdByFullName":" Administrator","createdBy":1,"lastUpdatedByFullName":" Administrator","lastUpdatedBy":1,"lastUpdated":"2018-12-10T19:53:25.258+0000"},{"id":6,"name":"MyAlfrescoDecommission - Test case 1","version":9,"modelType":0,"description":"","stencilSetId":0,"createdByFullName":" Administrator","createdBy":1,"lastUpdatedByFullName":" Administrator","lastUpdatedBy":1,"lastUpdated":"2018-12-10T19:53:25.297+0000"}],"theme":"theme-1","icon":"glyphicon-asterisk","publishIdentityInfo":[{"type":"user","person":{"id":2,"firstName":"Francesco","lastName":"Corti","email":"francesco@alfresco.com","company":"Alfresco"},"group":null}]}}
\ No newline at end of file
<?xml version='1.0' encoding='UTF-8'?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/processdef" xmlns:modeler="http://activiti.com/modeler" modeler:version="1.0en" modeler:exportDateTime="20180827134921400" modeler:modelId="8" modeler:modelVersion="8" modeler:modelLastUpdated="1535370429663">
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/processdef" xmlns:modeler="http://activiti.com/modeler" modeler:version="1.0en" modeler:exportDateTime="20181210205329354" modeler:modelId="8" modeler:modelVersion="9" modeler:modelLastUpdated="1544471605258">
<process id="MyAlfrescoComdecommision" name="MyAlfrescoCom decommision" isExecutable="true">
<extensionElements>
<modeler:executionvariables xmlns:modeler="http://activiti.com/modeler" modeler:variableName="myAlfrescoComTenant" modeler:variableType="string"/>
......@@ -128,13 +128,6 @@
</extensionElements>
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${(activiti_flowConditionsBean.exists(execution, 'form3outcome') && form3outcome == 'Confirm')}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-34AB7DB8-18DD-4A42-9347-F22F1EA843FC" name="Path 1" sourceRef="sid-4856C584-4F26-485B-A7D8-173338AEE8C1" targetRef="sid-CFCF1DF7-0D14-4679-8503-FE8182B05D25">
<extensionElements>
<modeler:conditionDefinition modeler:index="0" modeler:leftRestResponseId="offboardingPath" modeler:rightValue="1" modeler:operator="=="/>
<modeler:editor-resource-id><![CDATA[sid-34AB7DB8-18DD-4A42-9347-F22F1EA843FC]]></modeler:editor-resource-id>
</extensionElements>
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${(activiti_flowConditionsBean.exists(execution, 'offboardingPath') && offboardingPath == 1)}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-FAA7C4D3-1FA9-4716-9E0F-F81ADE427793" name="Path 2" sourceRef="sid-4856C584-4F26-485B-A7D8-173338AEE8C1" targetRef="sid-69FB3CA0-0F73-48EA-A5A7-2C90C52648EC">
<extensionElements>
<modeler:conditionDefinition modeler:index="0" modeler:leftRestResponseId="offboardingPath" modeler:rightValue="2" modeler:operator="=="/>
......@@ -173,6 +166,13 @@
<modeler:editor-resource-id><![CDATA[sid-BFD243E3-A596-48A7-8001-3A8339311A5E]]></modeler:editor-resource-id>
</extensionElements>
</sequenceFlow>
<sequenceFlow id="sid-34AB7DB8-18DD-4A42-9347-F22F1EA843FC" name="Path 1" sourceRef="sid-4856C584-4F26-485B-A7D8-173338AEE8C1" targetRef="sid-CFCF1DF7-0D14-4679-8503-FE8182B05D25">
<extensionElements>
<modeler:conditionDefinition modeler:index="0" modeler:leftRestResponseId="offboardingPath" modeler:rightValue="1" modeler:operator="=="/>
<modeler:editor-resource-id><![CDATA[sid-34AB7DB8-18DD-4A42-9347-F22F1EA843FC]]></modeler:editor-resource-id>
</extensionElements>
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${(activiti_flowConditionsBean.exists(execution, 'offboardingPath') && offboardingPath == 1)}]]></conditionExpression>
</sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_MyAlfrescoComdecommision">
<bpmndi:BPMNPlane bpmnElement="MyAlfrescoComdecommision" id="BPMNPlane_MyAlfrescoComdecommision">
......@@ -195,7 +195,7 @@
<omgdc:Bounds height="80.0" width="100.0" x="455.0" y="317.19171805506795"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-53E07693-F9A9-43AC-8C2B-E164DE23B58A" id="BPMNShape_sid-53E07693-F9A9-43AC-8C2B-E164DE23B58A">
<omgdc:Bounds height="28.0" width="28.0" x="641.0" y="630.0"/>
<omgdc:Bounds height="28.0" width="28.0" x="641.0" y="645.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-69FB3CA0-0F73-48EA-A5A7-2C90C52648EC" id="BPMNShape_sid-69FB3CA0-0F73-48EA-A5A7-2C90C52648EC">
<omgdc:Bounds height="80.0" width="100.0" x="605.0" y="317.19171805506795"/>
......@@ -224,18 +224,18 @@
<omgdi:waypoint x="505.0" y="530.0"/>
<omgdi:waypoint x="505.0" y="578.0"/>
<omgdi:waypoint x="655.0" y="578.0"/>
<omgdi:waypoint x="655.0" y="630.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-34AB7DB8-18DD-4A42-9347-F22F1EA843FC" id="BPMNEdge_sid-34AB7DB8-18DD-4A42-9347-F22F1EA843FC">
<omgdi:waypoint x="645.3225806451613" y="112.51429870022925"/>
<omgdi:waypoint x="505.0" y="262.19171805506795"/>
<omgdi:waypoint x="505.0" y="317.19171805506795"/>
<omgdi:waypoint x="655.0" y="645.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-BFD243E3-A596-48A7-8001-3A8339311A5E" id="BPMNEdge_sid-BFD243E3-A596-48A7-8001-3A8339311A5E">
<omgdi:waypoint x="805.0" y="397.19171805506795"/>
<omgdi:waypoint x="805.0" y="577.0"/>
<omgdi:waypoint x="655.0" y="577.0"/>
<omgdi:waypoint x="655.0" y="630.0"/>
<omgdi:waypoint x="655.0" y="645.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-34AB7DB8-18DD-4A42-9347-F22F1EA843FC" id="BPMNEdge_sid-34AB7DB8-18DD-4A42-9347-F22F1EA843FC">
<omgdi:waypoint x="645.3225806451613" y="112.51429870022925"/>
<omgdi:waypoint x="505.0" y="262.19171805506795"/>
<omgdi:waypoint x="505.0" y="317.19171805506795"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-A61ACD6B-FA17-4161-96AA-B838A6E4592B" id="BPMNEdge_sid-A61ACD6B-FA17-4161-96AA-B838A6E4592B">
<omgdi:waypoint x="500.0" y="120.0"/>
......
<?xml version='1.0' encoding='UTF-8'?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/processdef" xmlns:modeler="http://activiti.com/modeler" modeler:version="1.0en" modeler:exportDateTime="20180827134921433" modeler:modelId="6" modeler:modelVersion="8" modeler:modelLastUpdated="1535370429742">
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/processdef" xmlns:modeler="http://activiti.com/modeler" modeler:version="1.0en" modeler:exportDateTime="20181210205329414" modeler:modelId="6" modeler:modelVersion="9" modeler:modelLastUpdated="1544471605297">
<process id="MyAlfrescoDecommission-Testcase1" name="MyAlfrescoDecommission - Test case 1" isExecutable="true">
<startEvent id="startEvent1">
<extensionElements>
......
<?xml version='1.0' encoding='UTF-8'?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/processdef" xmlns:modeler="http://activiti.com/modeler" modeler:version="1.0en" modeler:exportDateTime="20180827134921375" modeler:modelId="7" modeler:modelVersion="8" modeler:modelLastUpdated="1535370429587">
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/processdef" xmlns:modeler="http://activiti.com/modeler" modeler:version="1.0en" modeler:exportDateTime="20181210205329332" modeler:modelId="7" modeler:modelVersion="9" modeler:modelLastUpdated="1544471605215">
<process id="MyAlfrescoDecommission-Testcase2" name="MyAlfrescoDecommission - Test case 2" isExecutable="true">
<startEvent id="startEvent1">
<extensionElements>
......
{"referenceId":8,"name":"MyAlfrescoCom decommission - Specialist intervention","description":"","editorJson":{"tabs":[],"fields":[{"fieldType":"ContainerRepresentation","id":"1533464052641","name":"Label","type":"container","value":null,"required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"dateDisplayFormat":null,"layout":null,"sizeX":2,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null,"numberOfColumns":1,"fields":{"1":[{"fieldType":"FormFieldRepresentation","id":"salesforceid","name":"Salesforce ID","type":"readonly","value":null,"required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"params":{"existingColspan":1,"maxColspan":1,"field":{"id":"salesforceId","name":"SalesForce ID","type":"text"}},"dateDisplayFormat":null,"layout":{"row":-1,"column":-1,"colspan":1},"sizeX":1,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null},{"fieldType":"FormFieldRepresentation","id":"message1","name":"message1","type":"readonly-text","value":"If the customer does not want to spend the time or resources migrating their content to another repository, forward the process to Path 1. Otherwise, forward the customer to Path 3.","required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"params":{"existingColspan":1,"maxColspan":1},"dateDisplayFormat":null,"layout":{"row":-1,"column":-1,"colspan":1},"sizeX":1,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null}]}}],"outcomes":[{"id":null,"name":"toPath1"},{"id":null,"name":"toPath3"}],"javascriptEvents":[],"className":"","style":"","customFieldTemplates":{},"metadata":{},"variables":[],"customFieldsValueInfo":{},"gridsterForm":false}}
\ No newline at end of file
{"referenceId":8,"name":"MyAlfrescoCom decommission - Specialist intervention","description":"","editorJson":{"tabs":[],"fields":[{"fieldType":"ContainerRepresentation","id":"1533464052641","name":"Label","type":"container","value":null,"required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"dateDisplayFormat":null,"layout":null,"sizeX":2,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null,"numberOfColumns":1,"fields":{"1":[{"fieldType":"FormFieldRepresentation","id":"couldtenantid","name":"Could Tenant ID","type":"readonly","value":null,"required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"params":{"existingColspan":1,"maxColspan":1,"field":{"id":"cloudTenantId","name":"Could Tenant ID","type":"text"}},"dateDisplayFormat":null,"layout":{"row":-1,"column":-1,"colspan":1},"sizeX":1,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null},{"fieldType":"FormFieldRepresentation","id":"message1","name":"message1","type":"readonly-text","value":"If the customer does not want to spend the time or resources migrating their content to another repository, forward the process to Path 1. Otherwise, forward the customer to Path 3.","required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"params":{"existingColspan":1,"maxColspan":1},"dateDisplayFormat":null,"layout":{"row":-1,"column":-1,"colspan":1},"sizeX":1,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null}]}}],"outcomes":[{"id":null,"name":"toPath1"},{"id":null,"name":"toPath3"}],"javascriptEvents":[],"className":"","style":"","customFieldTemplates":{},"metadata":{},"variables":[],"customFieldsValueInfo":{},"gridsterForm":false}}
\ No newline at end of file
{"referenceId":8,"name":"MyAlfrescoCom decommission - Wait for destruction","description":"","editorJson":{"tabs":[],"fields":[{"fieldType":"ContainerRepresentation","id":"1533464995011","name":"Label","type":"container","value":null,"required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"dateDisplayFormat":null,"layout":null,"sizeX":2,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null,"numberOfColumns":1,"fields":{"1":[{"fieldType":"FormFieldRepresentation","id":"salesforceid","name":"SalesForce ID","type":"readonly","value":null,"required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"params":{"existingColspan":1,"maxColspan":1,"field":{"id":"salesforceId","name":"SalesForce ID","type":"text"}},"dateDisplayFormat":null,"layout":{"row":-1,"column":-1,"colspan":1},"sizeX":1,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null},{"fieldType":"FormFieldRepresentation","id":"message2","name":"message2","type":"readonly-text","value":"Please inform the customer of the decommissioning of Alfresco Cloud.\nContinue if and only if the Customer has been informed.","required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"params":{"existingColspan":1,"maxColspan":1},"dateDisplayFormat":null,"layout":{"row":-1,"column":-1,"colspan":1},"sizeX":1,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null}]}}],"outcomes":[],"javascriptEvents":[],"className":"","style":"","customFieldTemplates":{},"metadata":{},"variables":[],"customFieldsValueInfo":{},"gridsterForm":false}}
\ No newline at end of file
{"referenceId":8,"name":"MyAlfrescoCom decommission - Wait for destruction","description":"","editorJson":{"tabs":[],"fields":[{"fieldType":"ContainerRepresentation","id":"1533464995011","name":"Label","type":"container","value":null,"required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"dateDisplayFormat":null,"layout":null,"sizeX":2,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null,"numberOfColumns":1,"fields":{"1":[{"fieldType":"FormFieldRepresentation","id":"couldtenantid","name":"Could Tenant ID","type":"readonly","value":null,"required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"params":{"existingColspan":1,"maxColspan":1,"field":{"id":"cloudTenantId","name":"Could Tenant ID","type":"text"}},"dateDisplayFormat":null,"layout":{"row":-1,"column":-1,"colspan":1},"sizeX":1,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null},{"fieldType":"FormFieldRepresentation","id":"message2","name":"message2","type":"readonly-text","value":"Please inform the customer of the decommissioning of Alfresco Cloud.\nContinue if and only if the Customer has been informed.","required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"params":{"existingColspan":1,"maxColspan":1},"dateDisplayFormat":null,"layout":{"row":-1,"column":-1,"colspan":1},"sizeX":1,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null}]}}],"outcomes":[],"javascriptEvents":[],"className":"","style":"","customFieldTemplates":{},"metadata":{},"variables":[],"customFieldsValueInfo":{},"gridsterForm":false}}
\ No newline at end of file
{"referenceId":8,"name":"MyAlfrescoCon decommission - Cloud Tenant ID","description":"","editorJson":{"tabs":[],"fields":[{"fieldType":"ContainerRepresentation","id":"1533289377979","name":"Label","type":"container","value":null,"required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"dateDisplayFormat":null,"layout":null,"sizeX":2,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null,"numberOfColumns":1,"fields":{"1":[{"fieldType":"FormFieldRepresentation","id":"cloudTenantId","name":"Could Tenant ID","type":"text","value":null,"required":true,"readOnly":false,"overrideId":true,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"params":{"existingColspan":1,"maxColspan":1},"dateDisplayFormat":null,"layout":{"row":-1,"column":-1,"colspan":1},"sizeX":1,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null}]}}],"outcomes":[],"javascriptEvents":[],"className":"","style":"","customFieldTemplates":{},"metadata":{},"variables":[],"customFieldsValueInfo":{},"gridsterForm":false}}
\ No newline at end of file
{"referenceId":8,"name":"MyAlfrescoCon decommission - Export done","description":"","editorJson":{"tabs":[],"fields":[{"fieldType":"ContainerRepresentation","id":"1533457686996","name":"Label","type":"container","value":null,"required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"dateDisplayFormat":null,"layout":null,"sizeX":2,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null,"numberOfColumns":1,"fields":{"1":[{"fieldType":"FormFieldRepresentation","id":"salesforceid","name":"SalesForce ID","type":"readonly","value":null,"required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"params":{"existingColspan":1,"maxColspan":1,"field":{"id":"salesforceId","name":"SalesForce ID","type":"text"}},"dateDisplayFormat":null,"layout":{"row":-1,"column":-1,"colspan":1},"sizeX":1,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null},{"fieldType":"FormFieldRepresentation","id":"exportpathonmyalfrescocomserver","name":"Export path on my.alfresco.com server","type":"readonly","value":null,"required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"params":{"existingColspan":1,"maxColspan":1,"field":{"id":"myAlfrescoComExportPath","name":"myAlfrescoComExportPath","type":"string","responseVariable":true}},"dateDisplayFormat":null,"layout":{"row":-1,"column":-1,"colspan":1},"sizeX":1,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null},{"fieldType":"FormFieldRepresentation","id":"label1","name":"Label1","type":"readonly-text","value":"An automatic process will compress and encrypt the content for you, and then will publish the archive into an S3 bucket (protected with a password).\n\nPlease check a new case on Salesforce, automatically created to manage the download of the archive by the customer.","required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"params":{"existingColspan":1,"maxColspan":1},"dateDisplayFormat":null,"layout":{"row":-1,"column":-1,"colspan":1},"sizeX":1,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null}]}}],"outcomes":[{"id":null,"name":"Cancel"},{"id":null,"name":"Confirm"}],"javascriptEvents":[],"className":"","style":"","customFieldTemplates":{},"metadata":{},"variables":[],"customFieldsValueInfo":{},"gridsterForm":false}}
\ No newline at end of file
{"referenceId":8,"name":"MyAlfrescoCon decommission - Export done","description":"","editorJson":{"tabs":[],"fields":[{"fieldType":"ContainerRepresentation","id":"1533457686996","name":"Label","type":"container","value":null,"required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"dateDisplayFormat":null,"layout":null,"sizeX":2,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null,"numberOfColumns":1,"fields":{"1":[{"fieldType":"FormFieldRepresentation","id":"couldtenantid","name":"Could Tenant ID","type":"readonly","value":null,"required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"params":{"existingColspan":1,"maxColspan":1,"field":{"id":"cloudTenantId","name":"Could Tenant ID","type":"text"}},"dateDisplayFormat":null,"layout":{"row":-1,"column":-1,"colspan":1},"sizeX":1,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null},{"fieldType":"FormFieldRepresentation","id":"exportpathonmyalfrescocomserver","name":"Export path on my.alfresco.com server","type":"readonly","value":null,"required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"params":{"existingColspan":1,"maxColspan":1,"field":{"id":"myAlfrescoComExportPath","name":"myAlfrescoComExportPath","type":"string","responseVariable":true}},"dateDisplayFormat":null,"layout":{"row":-1,"column":-1,"colspan":1},"sizeX":1,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null},{"fieldType":"FormFieldRepresentation","id":"label1","name":"Label1","type":"readonly-text","value":"An automatic process will compress and encrypt the content for you, and then will publish the archive into an S3 bucket (protected with a password).\n\nPlease check a new case on Salesforce, automatically created to manage the download of the archive by the customer.","required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"params":{"existingColspan":1,"maxColspan":1},"dateDisplayFormat":null,"layout":{"row":-1,"column":-1,"colspan":1},"sizeX":1,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null}]}}],"outcomes":[{"id":null,"name":"Cancel"},{"id":null,"name":"Confirm"}],"javascriptEvents":[],"className":"","style":"","customFieldTemplates":{},"metadata":{},"variables":[],"customFieldsValueInfo":{},"gridsterForm":false}}
\ No newline at end of file
{"referenceId":8,"name":"MyAlfrescoCon decommission - SalesForce ID","description":"","editorJson":{"tabs":[],"fields":[{"fieldType":"ContainerRepresentation","id":"1533289377979","name":"Label","type":"container","value":null,"required":false,"readOnly":false,"overrideId":false,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"dateDisplayFormat":null,"layout":null,"sizeX":2,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null,"numberOfColumns":1,"fields":{"1":[{"fieldType":"FormFieldRepresentation","id":"salesforceId","name":"SalesForce ID","type":"text","value":null,"required":true,"readOnly":false,"overrideId":true,"colspan":1,"placeholder":null,"minLength":0,"maxLength":0,"minValue":null,"maxValue":null,"regexPattern":null,"optionType":null,"hasEmptyValue":null,"options":null,"restUrl":null,"restResponsePath":null,"restIdProperty":null,"restLabelProperty":null,"tab":null,"className":null,"params":{"existingColspan":1,"maxColspan":1},"dateDisplayFormat":null,"layout":{"row":-1,"column":-1,"colspan":1},"sizeX":1,"sizeY":1,"row":-1,"col":-1,"visibilityCondition":null}]}}],"outcomes":[],"javascriptEvents":[],"className":"","style":"","customFieldTemplates":{},"metadata":{},"variables":[],"customFieldsValueInfo":{},"gridsterForm":false}}
\ No newline at end of file
......@@ -34,15 +34,15 @@ public class MyAlfrescoComDecommissionUnitTest extends AbstractBpmnTest {
processDefinitionKey = "MyAlfrescoComdecommision";
}
final static String SALESFORCE_ID_EXAMPLE_PATH_1 = "CT-0000094";
final static String SALESFORCE_ID_EXAMPLE_PATH_2 = "CT-0000021";
final static String SALESFORCE_ID_EXAMPLE_PATH_3 = "CT-0000197";
final static String CLOUD_TENANT_ID_EXAMPLE_PATH_1 = "CT-0000094";
final static String CLOUD_TENANT_ID_EXAMPLE_PATH_2 = "CT-0000021";
final static String CLOUD_TENANT_ID_EXAMPLE_PATH_3 = "CT-0000197";
private static Logger logger = LoggerFactory.getLogger(MyAlfrescoComDecommissionUnitTest.class);
@Test
public void testCancellationAfterSalesforceSummary() throws Exception {
ProcessInstance processInstance = startProcess(MyAlfrescoComDecommissionUnitTest.SALESFORCE_ID_EXAMPLE_PATH_1);
ProcessInstance processInstance = startProcess(MyAlfrescoComDecommissionUnitTest.CLOUD_TENANT_ID_EXAMPLE_PATH_1);
String assignee = (String) runtimeService.getVariables(processInstance.getId()).get(ProcessUtil.CSM_ASSIGNEE);
saleforceSummary(assignee, "Cancel");
ProcessInstanceAssert.assertThat(processInstance).isComplete();
......@@ -50,7 +50,7 @@ public class MyAlfrescoComDecommissionUnitTest extends AbstractBpmnTest {
@Test
public void testingPath1() throws Exception {
ProcessInstance processInstance = startProcess(MyAlfrescoComDecommissionUnitTest.SALESFORCE_ID_EXAMPLE_PATH_1);
ProcessInstance processInstance = startProcess(MyAlfrescoComDecommissionUnitTest.CLOUD_TENANT_ID_EXAMPLE_PATH_1);
String assignee = (String) runtimeService.getVariables(processInstance.getId()).get(ProcessUtil.CSM_ASSIGNEE);
saleforceSummary(assignee, "Confirm");
exportDone(assignee, (String) runtimeService.getVariables(processInstance.getId()).get(ProcessUtil.MY_ALFRESCO_COM_EXPORT_PATH_VARIABLE));
......@@ -59,7 +59,7 @@ public class MyAlfrescoComDecommissionUnitTest extends AbstractBpmnTest {
@Test
public void testingPath2AlongPath1() throws Exception {
ProcessInstance processInstance = startProcess(MyAlfrescoComDecommissionUnitTest.SALESFORCE_ID_EXAMPLE_PATH_2);
ProcessInstance processInstance = startProcess(MyAlfrescoComDecommissionUnitTest.CLOUD_TENANT_ID_EXAMPLE_PATH_2);
String assignee = (String) runtimeService.getVariables(processInstance.getId()).get(ProcessUtil.CSM_ASSIGNEE);
saleforceSummary(assignee, "Confirm");
decommissionSpecialistIntervention(assignee, "toPath1");
......@@ -69,7 +69,7 @@ public class MyAlfrescoComDecommissionUnitTest extends AbstractBpmnTest {
@Test
public void testingPath2AlongPath3() throws Exception {
ProcessInstance processInstance = startProcess(MyAlfrescoComDecommissionUnitTest.SALESFORCE_ID_EXAMPLE_PATH_2);
ProcessInstance processInstance = startProcess(MyAlfrescoComDecommissionUnitTest.CLOUD_TENANT_ID_EXAMPLE_PATH_2);
String assignee = (String) runtimeService.getVariables(processInstance.getId()).get(ProcessUtil.CSM_ASSIGNEE);
saleforceSummary(assignee, "Confirm");
decommissionSpecialistIntervention(assignee, "toPath3");
......@@ -79,7 +79,7 @@ public class MyAlfrescoComDecommissionUnitTest extends AbstractBpmnTest {
@Test
public void testingPath3() throws Exception {
ProcessInstance processInstance = startProcess(MyAlfrescoComDecommissionUnitTest.SALESFORCE_ID_EXAMPLE_PATH_3);
ProcessInstance processInstance = startProcess(MyAlfrescoComDecommissionUnitTest.CLOUD_TENANT_ID_EXAMPLE_PATH_3);
String assignee = (String) runtimeService.getVariables(processInstance.getId()).get(ProcessUtil.CSM_ASSIGNEE);
saleforceSummary(assignee, "Confirm");
waitForDestruction(assignee);
......@@ -90,12 +90,12 @@ public class MyAlfrescoComDecommissionUnitTest extends AbstractBpmnTest {
Map<String, Object> taskVariables = new HashMap<String, Object>();
taskVariables.put("initiator", "$INITIATOR");
taskVariables.put(ProcessUtil.SALESFORCE_CUSTOMER_ID_VARIABLE, saleforceId);
taskVariables.put(ProcessUtil.CLOUD_TENANT_ID_VARIABLE, saleforceId);
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processDefinitionKey, taskVariables);
assertNotNull(processInstance);
assertNotNull(runtimeService.getVariables(processInstance.getId()).get(ProcessUtil.SALESFORCE_CUSTOMER_ID_VARIABLE));
assertNotNull(runtimeService.getVariables(processInstance.getId()).get(ProcessUtil.CLOUD_TENANT_ID_VARIABLE));
assertNotNull(runtimeService.getVariables(processInstance.getId()).get(ProcessUtil.MY_ALFRESCO_COM_TENANT_VARIABLE));
assertNotNull(runtimeService.getVariables(processInstance.getId()).get(ProcessUtil.CUSTOMER_TYPE_VARIABLE));
assertNotNull(runtimeService.getVariables(processInstance.getId()).get(ProcessUtil.MY_ALFRESCO_COM_GB_VARIABLE));
......
......@@ -38,7 +38,7 @@ public class SalesforceSpreadsheetUnitTest extends AbstractBpmnTest {
private static Logger logger = LoggerFactory.getLogger(SalesforceSpreadsheetUnitTest.class);
final static int MAX_TESTS = 50;
final static int MAX_TESTS = 5;
MyAlfrescoComDecommissionResourceProperties myAlfrescoComDecommissionResourceProperties;
......@@ -50,7 +50,7 @@ public class SalesforceSpreadsheetUnitTest extends AbstractBpmnTest {
myAlfrescoComDecommissionResourceProperties = new MyAlfrescoComDecommissionResourceProperties();
myAlfrescoComDecommissionResourceProperties.load();
Iterator<String> iterator = getSalesforceIds().iterator();
Iterator<String> iterator = getCouldTenantIds().iterator();
int i = 0;
while (iterator.hasNext() && i++ < SalesforceSpreadsheetUnitTest.MAX_TESTS) {
......@@ -59,33 +59,33 @@ public class SalesforceSpreadsheetUnitTest extends AbstractBpmnTest {
}
private Set<String> getSalesforceIds() throws Exception {
private Set<String> getCouldTenantIds() throws Exception {
Set<String> result = new HashSet<String>();
Sheet sheet = SpreadsheetUtil.getSheet(new File(getClass().getClassLoader().getResource(myAlfrescoComDecommissionResourceProperties.getProperty(MyAlfrescoComDecommissionResourceProperties.SALESFORCE_SPREADSHEET_FILE_NAME)).getFile()), SpreadsheetUtil.SALESFORCE_SHEET_NUMBER);
int salesforceIdColumnIndex = SpreadsheetUtil.getColumnIndex(sheet, SpreadsheetUtil.SALESFORCE_CUSTOMER_ID_COLUMN_DESCRIPTION);
int cloudTenantIdColumnIndex = SpreadsheetUtil.getColumnIndex(sheet, SpreadsheetUtil.CLOUD_TENANT_ID_COLUMN_DESCRIPTION);
Iterator<Row> iterator = sheet.iterator();
iterator.next(); // Skipping the header.
while (iterator.hasNext()) {
Row currentRow = iterator.next();
if (currentRow.getCell(salesforceIdColumnIndex) != null &&
currentRow.getCell(salesforceIdColumnIndex).getCellTypeEnum() == CellType.STRING) {
result.add(currentRow.getCell(salesforceIdColumnIndex).getStringCellValue());
if (currentRow.getCell(cloudTenantIdColumnIndex) != null &&
currentRow.getCell(cloudTenantIdColumnIndex).getCellTypeEnum() == CellType.STRING) {
result.add(currentRow.getCell(cloudTenantIdColumnIndex).getStringCellValue());
}
}
return result;
}
private void testCustomer(String salesforceId) throws Exception {
private void testCustomer(String cloudTenantId) throws Exception {
logger.info("Testing Salesforce Customer with ID='" + salesforceId + "'.");
logger.info("Testing Cloud Customer with ID='" + cloudTenantId + "'.");
Map<String, Object> taskVariables = new HashMap<String, Object>();
taskVariables.put("initiator", "$INITIATOR");
taskVariables.put("salesforceId", salesforceId);
taskVariables.put("cloudTenantId", cloudTenantId);
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processDefinitionKey, taskVariables);
ProcessInstanceAssert.assertThat(processInstance).isComplete();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment