1 Reply Latest reply on Nov 24, 2016 3:01 AM by jimmy001

    How to replace operations-dsl.mvel

    jimmy001 Apprentice

      Hi,

       

      I am using jbpm 6.4 in embedded mode, CDI Service API. My question is how can I replace the operations-dsl.mvel ?

      As default the file is located in "jbpm-human-task-core.jar". I would like to use a version I have modified and packaged at a differen location.

      What steps are necessary?

       

      Thx in advance

      J.

        • 1. Re: How to replace operations-dsl.mvel
          jimmy001 Apprentice

          A small update:

           

          I could find the place where it is loaded - MVELLifeCycleManager

           

           public static Map<Operation, List<OperationCommand>> initMVELOperations() {
          
                  Map<String, Object> vars = new HashMap<String, Object>();
          
                  // Search operations-dsl.mvel, if necessary using superclass if TaskService is subclassed
                  InputStream is = null;
                  // for (Class<?> c = getClass(); c != null; c = c.getSuperclass()) {
                  is = MVELLifeCycleManager.class.getResourceAsStream("/operations-dsl.mvel");
          //            if (is != null) {
          //                break;
          //            }
                  //}
                  if (is == null) {
                      throw new RuntimeException("Unable To initialise TaskService, could not find Operations DSL");
                  }
                  Reader reader = new InputStreamReader(is);
                  try {
                      return (Map<Operation, List<OperationCommand>>) eval(toString(reader), vars);
                  } catch (IOException e) {
                      throw new RuntimeException("Unable To initialise TaskService, could not load Operations DSL");
                  }
          
          
              }