Hello,
Trying to work out how to add key/value pair properties to the stencilset.json for 'Class Fields'.
Basically, so that when a user drags a ServiceTask into the canvas, the Class Fields form is prepopulated with some values from the stencilset json
[This is the form with 'Name' 'Implementation' on the left; with String value, String and Expression textfields on the right]
I've tried just about every combintation of json I can think of, and I can't get it to pre-populate the form.
This is the area of the stencilset.json I'm tryng to prepopulate:
{
"name" : "search_servicetaskfieldspackage",
"properties" : [ {
"id" : "servicetaskfields",
"type" : "Complex",
"title" : "Class fields",
"value" : "",
"complexItems" : [ {
"id" : "servicetask_field_name",
"name" : "Name",
"type" : "String",
"value" : "can I get some values into this",
"width" : 200,
"optional" : false
}, {
"id" : "servicetask_field_value",
"name" : "String value",
"type" : "String",
"value" : "",
"width" : 200,
"optional" : false
}, {
"id" : "servicetask_field_expression",
"name" : "Expression",
"type" : "String",
"value" : "",
"width" : 200,
"optional" : false
} ],
"description" : "Search parameters",
"popular" : true
} ]
}
Maybe I need to add some special key names?
Any help on how to do this would much appreciated!
Many thanks
Solved! Go to Solution.
Hi midiman _,
This is how it worked for me.
{
"name" : "servicetaskfieldspackage",
"properties" : [ {
"id" : "servicetaskfields",
"type" : "Complex",
"title" : "BPMN-EDITOR.PROPERTY.SERVICETASK-FIELDS.TITLE",
"value" : {"fields":[{"name":"fieldName","implementation":"nana","stringValue":"nana","expression":"","string":""}]},
"description" : "BPMN-EDITOR.PROPERTY.SERVICETASK-FIELDS.DESCRIPTION",
"popular" : true
} ]
}
Hope that helps.
Anyone? If anyone has an idea how to do this, any help is much appreciated! Thanks
bump.
Wow, maybe i'm the only one whose tried to add content to class fields?
Is there anyone out there that could help me please??
Thanks
Hi midiman _,
This is how it worked for me.
{
"name" : "servicetaskfieldspackage",
"properties" : [ {
"id" : "servicetaskfields",
"type" : "Complex",
"title" : "BPMN-EDITOR.PROPERTY.SERVICETASK-FIELDS.TITLE",
"value" : {"fields":[{"name":"fieldName","implementation":"nana","stringValue":"nana","expression":"","string":""}]},
"description" : "BPMN-EDITOR.PROPERTY.SERVICETASK-FIELDS.DESCRIPTION",
"popular" : true
} ]
}
Hope that helps.
Hi @balsarori
You are a star! Works a treat. Thank you so much for helping me out!!
Peter (alias @00155837364765867)
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.