use of org.jbpm.casemgmt.impl.command.AddDataCaseFileInstanceCommand in project jbpm by kiegroup.
the class CaseServiceImpl method addDataToCaseFile.
/*
* Case file data methods
*/
@Override
public void addDataToCaseFile(String caseId, String name, Object value, String... restrictedTo) throws CaseNotFoundException {
authorizationManager.checkOperationAuthorization(caseId, ProtectedOperation.ADD_DATA);
ProcessInstanceDesc pi = verifyCaseIdExists(caseId);
List<String> accessRestriction = null;
if (restrictedTo != null) {
accessRestriction = Arrays.asList(restrictedTo);
}
Map<String, Object> parameters = new HashMap<>();
parameters.put(name, value);
processService.execute(pi.getDeploymentId(), ProcessInstanceIdContext.get(pi.getId()), new AddDataCaseFileInstanceCommand(identityProvider, parameters, accessRestriction, authorizationManager));
}
use of org.jbpm.casemgmt.impl.command.AddDataCaseFileInstanceCommand in project jbpm by kiegroup.
the class CaseServiceImpl method addDataToCaseFile.
@Override
public void addDataToCaseFile(String caseId, Map<String, Object> data, String... restrictedTo) throws CaseNotFoundException {
authorizationManager.checkOperationAuthorization(caseId, ProtectedOperation.ADD_DATA);
ProcessInstanceDesc pi = verifyCaseIdExists(caseId);
List<String> accessRestriction = null;
if (restrictedTo != null) {
accessRestriction = Arrays.asList(restrictedTo);
}
processService.execute(pi.getDeploymentId(), ProcessInstanceIdContext.get(pi.getId()), new AddDataCaseFileInstanceCommand(identityProvider, data, accessRestriction, authorizationManager));
}
Aggregations