cancel
Showing results for 
Search instead for 
Did you mean: 

Adding candidate starters in Activiti Modeler

b_schnarr
Champ in-the-making
Champ in-the-making
Hello at all,

since the Activiti Modeler already contains Activiti specific elements, what effort is it to add candidate start users and candidate start groups? Because in my opinion, those are the last important elements missing in the Activiti Modeler. If those attributes were included, simple processes (without java / service logic) could directly be modeled and deployed in the Activiti Modeler without the need of importing it into Eclipse (just for adding the candidate starters).

Is this on the roadmap? What components must be altered in the Modeler? This extension would make the Activiti Modeler a bit more enterprise compliant.

Best regards
Ben
13 REPLIES 13

b_schnarr
Champ in-the-making
Champ in-the-making
No one?

trademak
Star Contributor
Star Contributor
Hi Ben,

That's not a big effort. Our priority currently lies with the Engine, so it's more a matter of priority.

Best regards,

b_schnarr
Champ in-the-making
Champ in-the-making
If it is not a big effort, could you give me a hint what I have to alter? I assume just adding the definition to the stencilset.json is not enough? Because actually, the Modeler just ignores those tags…

Thanks and best regards
Ben

b_schnarr
Champ in-the-making
Champ in-the-making
If someone could give me a hint, I´d consider creating a pull request.

trademak
Star Contributor
Star Contributor
Hi Ben,

It would only be a change in the stencilset.json definition for this issue. To be able to transform to BPMN XML also a JSON converter change is needed.
You can look at the usertaskassignment definition in stencilset.json as an example.

Best regards,

b_schnarr
Champ in-the-making
Champ in-the-making
Hello Tijs,

thanks for your reply but I am still stuck. After the "processbase", I added those lines in the stencilset.json:

<code>
{
    "name" : "processassignment",
    "properties" : [ {
      "id" : "processassignment",
      "type" : "Complex",
      "title" : "Candidates",
      "value" : "",
      "description" : "Assignment definition for the process",
      "popular" : true,
      "complexItems" : [ {
        "id" : "assignment_type",
        "name" : "Type",
        "name_de" : "Typ",
        "type" : "Choice",
        "value" : "",
        "width" : 100,
        "optional" : false,
        "items" : [ {
          "id" : "p1",
          "title" : "Candidate users",
          "title_de" : "HumanPerformer",
          "value" : "candidateUsers",
          "refToView" : ""
        }, {
          "id" : "p2",
          "title" : "Candidate groups",
          "title_de" : "PotentialOwner",
          "value" : "candidateGroups",
          "refToView" : ""
        } ]
      }, {
        "id" : "resourceassignmentexpr1",
        "name" : "Resource assignment expression",
        "name_de" : "Zuordnungs-Ausdruck",
        "type" : "String",
        "description" : "This defines the expression used for the resource assignment.",
        "description_de" : "Definiert den Ausdruck, der fr die Zordung von Ressourcen genutzt wird.",
        "value" : "",
        "width" : 200,
        "optional" : true
      } ]
    } ]
  }
</code>

Therefore, the whole "processbase" definition looks like this:

<code>
{
    "name" : "processbase",
    "properties" : [ {
      "id" : "process_id",
      "type" : "String",
      "title" : "Process identifier",
      "value" : "process",
      "description" : "Unique identifier of the process definition.",
      "popular" : true
    }, {
      "id" : "process_author",
      "type" : "String",
      "title" : "Process author",
      "value" : "",
      "description" : "Author of the process definition.",
      "popular" : false
    }, {
      "id" : "process_executable",
   "type" : "Choice",
   "title" : "Executable",
   "value" : "Yes",
   "description" : "Define if the process is executable.",
   "popular" : true,
   "items" : [ {
     "id" : "no",
     "title" : "No",
     "value" : "No"
   }, {
     "id" : "yes",
     "title" : "Yes",
     "value" : "Yes"
   }]
    }, {
      "id" : "process_version",
      "type" : "String",
      "title" : "Process version string (documentation only)",
      "value" : "",
      "description" : "Version identifier for documentation purpose.",
      "popular" : false
    }, {
      "id" : "process_namespace",
      "type" : "String",
      "title" : "Target namespace",
      "value" : "http://www.activiti.org/processdef",
      "description" : "Target namespace for the process definition.",
      "popular" : false
    } ]
  }, {
    "name" : "processassignment",
    "properties" : [ {
      "id" : "processassignment",
      "type" : "Complex",
      "title" : "Candidates",
      "value" : "",
      "description" : "Assignment definition for the process",
      "popular" : true,
      "complexItems" : [ {
        "id" : "assignment_type",
        "name" : "Type",
        "name_de" : "Typ",
        "type" : "Choice",
        "value" : "",
        "width" : 100,
        "optional" : false,
        "items" : [ {
          "id" : "p1",
          "title" : "Candidate users",
          "title_de" : "HumanPerformer",
          "value" : "candidateUsers",
          "refToView" : ""
        }, {
          "id" : "p2",
          "title" : "Candidate groups",
          "title_de" : "PotentialOwner",
          "value" : "candidateGroups",
          "refToView" : ""
        } ]
      }, {
        "id" : "resourceassignmentexpr1",
        "name" : "Resource assignment expression",
        "name_de" : "Zuordnungs-Ausdruck",
        "type" : "String",
        "description" : "This defines the expression used for the resource assignment.",
        "description_de" : "Definiert den Ausdruck, der fr die Zordung von Ressourcen genutzt wird.",
        "value" : "",
        "width" : 200,
        "optional" : true
      } ]
    } ]
  },
  {
    "name" : "usertaskbase",…..
…….
…..
</code>

But when I open the modeler, I cannot see those new attributes. In addition, could you give me another hint what lines need to be changed in the JSON converter?
Thanks for your help and best regards
Ben

b_schnarr
Champ in-the-making
Champ in-the-making
Strange…my last posting just disappeared. Ok, then once again.

Hi Tijs,

thanks for your reply. But I am still stuck. After the "processbase" definition, I added those lines here:

<code>
{
    "name" : "processassignment",
    "properties" : [ {
      "id" : "processassignment",
      "type" : "Complex",
      "title" : "Processassignments",
      "value" : "",
      "description" : "Assignment definition for the process",
      "popular" : true,
      "complexItems" : [ {
        "id" : "process_assignment_type",
        "name" : "Type",
        "name_de" : "Typ",
        "type" : "Choice",
        "value" : "",
        "width" : 100,
        "optional" : false,
        "items" : [ {
          "id" : "p1",
          "title" : "Candidate users",
          "title_de" : "HumanPerformer",
          "value" : "candidateUsers",
          "refToView" : ""
        }, {
          "id" : "p2",
          "title" : "Candidate groups",
          "title_de" : "PotentialOwner",
          "value" : "candidateGroups",
          "refToView" : ""
        } ]
      }, {
        "id" : "resourceassignmentexpr1",
        "name" : "Resource assignment expression",
        "name_de" : "Zuordnungs-Ausdruck",
        "type" : "String",
        "description" : "This defines the expression used for the resource assignment.",
        "description_de" : "Definiert den Ausdruck, der fuer die Zordung von Ressourcen genutzt wird.",
        "value" : "",
        "width" : 200,
        "optional" : true
      } ]
    } ]
  }
</code>

So the whole block looks like this:

<code>
{
    "name" : "processbase",
    "properties" : [ {
      "id" : "process_id",
      "type" : "String",
      "title" : "Process identifier",
      "value" : "process",
      "description" : "Unique identifier of the process definition.",
      "popular" : true
    }, {
      "id" : "process_author",
      "type" : "String",
      "title" : "Process author",
      "value" : "",
      "description" : "Author of the process definition.",
      "popular" : false
    }, {
      "id" : "process_executable",
   "type" : "Choice",
   "title" : "Executable",
   "value" : "Yes",
   "description" : "Define if the process is executable.",
   "popular" : true,
   "items" : [ {
     "id" : "no",
     "title" : "No",
     "value" : "No"
   }, {
     "id" : "yes",
     "title" : "Yes",
     "value" : "Yes"
   }]
    }, {
      "id" : "process_version",
      "type" : "String",
      "title" : "Process version string (documentation only)",
      "value" : "",
      "description" : "Version identifier for documentation purpose.",
      "popular" : false
    }, {
      "id" : "process_namespace",
      "type" : "String",
      "title" : "Target namespace",
      "value" : "http://www.activiti.org/processdef",
      "description" : "Target namespace for the process definition.",
      "popular" : false
    } ]
  }, {
    "name" : "processassignment",
    "properties" : [ {
      "id" : "processassignment",
      "type" : "Complex",
      "title" : "Processassignments",
      "value" : "",
      "description" : "Assignment definition for the process",
      "popular" : true,
      "complexItems" : [ {
        "id" : "process_assignment_type",
        "name" : "Type",
        "name_de" : "Typ",
        "type" : "Choice",
        "value" : "",
        "width" : 100,
        "optional" : false,
        "items" : [ {
          "id" : "p1",
          "title" : "Candidate users",
          "title_de" : "HumanPerformer",
          "value" : "candidateUsers",
          "refToView" : ""
        }, {
          "id" : "p2",
          "title" : "Candidate groups",
          "title_de" : "PotentialOwner",
          "value" : "candidateGroups",
          "refToView" : ""
        } ]
      }, {
        "id" : "resourceassignmentexpr1",
        "name" : "Resource assignment expression",
        "name_de" : "Zuordnungs-Ausdruck",
        "type" : "String",
        "description" : "This defines the expression used for the resource assignment.",
        "description_de" : "Definiert den Ausdruck, der fuer die Zordung von Ressourcen genutzt wird.",
        "value" : "",
        "width" : 200,
        "optional" : true
      } ]
    } ]
  }
</code>

But those additions are not visible in the web modeler afterwoods. In addition, could you give me a hint want lines need to be changed in the JSON Converter? Since there are many classes, I did not succeed in finding the right place.

Thank you very much and best regards
Ben

trademak
Star Contributor
Star Contributor
Sorry for the late reply. Did you add the processassignment property to the start event or the main process element in the JSON definition?

Best regards,

b_schnarr
Champ in-the-making
Champ in-the-making