Package org.activiti.engine

Examples of org.activiti.engine.ActivitiIllegalArgumentException


   
  }
 
  protected RestVariable setSimpleVariable(RestVariable restVariable, Task task, boolean isNew, String serverRootUrl) {
    if (restVariable.getName() == null) {
      throw new ActivitiIllegalArgumentException("Variable name is required");
    }

    // Figure out scope, revert to local is omitted
    RestVariableScope scope = restVariable.getVariableScope();
    if (scope == null) {
View Full Code Here


      if (task.getExecutionId() != null) {
        // Explicitly set on execution, setting non-local variable on task will override local-variable if exists
        runtimeService.setVariable(task.getExecutionId(), name, value);
      } else {
        // Standalone task, no global variables possible
        throw new ActivitiIllegalArgumentException("Cannot set global variable '" + name + "' on task '" +
            task.getId() +"', task is not part of process.");
      }
    }
  }
View Full Code Here

    RestVariable result = null;
    if (request instanceof MultipartHttpServletRequest) {
      result = setBinaryVariable((MultipartHttpServletRequest) request, task, false, serverRootUrl);
     
      if (!result.getName().equals(variableName)) {
        throw new ActivitiIllegalArgumentException("Variable name in the body should be equal to the name used in the requested URL.");
      }
     
    } else {
     
      RestVariable restVariable = null;
     
      try {
        restVariable = objectMapper.readValue(request.getInputStream(), RestVariable.class);
      } catch (Exception e) {
        throw new ActivitiIllegalArgumentException("Error converting request body to RestVariable instance", e);
      }
     
      if (restVariable == null) {
        throw new ActivitiException("Invalid body was supplied");
      }
      if (!restVariable.getName().equals(variableName)) {
        throw new ActivitiIllegalArgumentException("Variable name in the body should be equal to the name used in the requested URL.");
      }
     
      result = setSimpleVariable(restVariable, task, false, serverRootUrl);
    }
    return result;
View Full Code Here

          .handleInvocation(new TaskListenerInvocation((TaskListener)delegate, delegateTask));
      }catch (Exception e) {
        throw new ActivitiException("Exception while invoking TaskListener: "+e.getMessage(), e);
      }
    } else {
      throw new ActivitiIllegalArgumentException("Delegate expression " + expression
              + " did not resolve to an implementation of " + TaskListener.class );
    }
  }
View Full Code Here

    } else if (delegate instanceof JavaDelegate) {
      Context.getProcessEngineConfiguration()
        .getDelegateInterceptor()
        .handleInvocation(new JavaDelegateInvocation((JavaDelegate) delegate, execution));
    } else {
      throw new ActivitiIllegalArgumentException("Delegate expression " + expression
              + " did not resolve to an implementation of " + ExecutionListener.class
              + " nor " + JavaDelegate.class);
    }
  }
View Full Code Here

    return this;
  }

  public HistoricProcessInstanceQuery processInstanceIds(Set<String> processInstanceIds) {
    if (processInstanceIds == null) {
      throw new ActivitiIllegalArgumentException("Set of process instance ids is null");
    }
    if (processInstanceIds.isEmpty()) {
      throw new ActivitiIllegalArgumentException("Set of process instance ids is empty");
    }
   
    if (inOrStatement) {
      this.orQueryObject.processInstanceIds = processInstanceIds;
    } else {
View Full Code Here

    return this;
  }
 
  public HistoricProcessInstanceQuery processInstanceTenantId(String tenantId) {
    if (tenantId == null) {
      throw new ActivitiIllegalArgumentException("process instance tenant id is null");
    }
    if (inOrStatement) {
      this.orQueryObject.tenantId = tenantId;
    } else {
      this.tenantId = tenantId;
View Full Code Here

    return this;
  }
 
  public HistoricProcessInstanceQuery processInstanceTenantIdLike(String tenantIdLike) {
    if (tenantIdLike == null) {
      throw new ActivitiIllegalArgumentException("process instance tenant id is null");
    }
    if (inOrStatement) {
      this.orQueryObject.tenantIdLike = tenantIdLike;
    } else {
      this.tenantIdLike = tenantIdLike;
View Full Code Here

  }

  protected Date addSingleUnitQuantity(Date startDate, String singleUnitQuantity) {
    int spaceIndex = singleUnitQuantity.indexOf(" ");
    if (spaceIndex==-1 || singleUnitQuantity.length() < spaceIndex+1) {
      throw new ActivitiIllegalArgumentException("invalid duedate format: "+singleUnitQuantity);
    }
   
    String quantityText = singleUnitQuantity.substring(0, spaceIndex);
    Integer quantity = new Integer(quantityText);
   
View Full Code Here

      logger.info("Calculated Date: " + (date == null ? "Will Not Run Again" : date));

      return date;

    } catch (Exception e) {
      throw new ActivitiIllegalArgumentException("Cannot parse duration", e);
    }

  }
View Full Code Here

TOP

Related Classes of org.activiti.engine.ActivitiIllegalArgumentException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.