alfresco workflow details page - how to hide parameters? - workflow

I'm having issues and questions regarding the workflow details form. From what I've understood so far, modifications can mainly be done by modifying share-config-custom.xml, by adding a form-tag looking something like this (tried a number of variations):
<form id="workflow-details">
<field-visibility>
<show id="cmpny:processId" />
<hide id="cmpny:title" />
<hide id="cmpny:description" />
<hide id="packageItems" />
<hide id="cmpny:reason"/>
<hide id="cmpny:review"/>
<hide id="cmpny:deadline" />
<hide id="cmpny:customReviewOutcome"/>
</field-visibility>
<appearance>
<set id="" appearance="title" label="Overview" />
<set id="main" appearance="title" label="Description" />
<field id="cmpny:processId" set="main" label="Process-ID"/>
</appearance>
</form>
I have mainly tried copying the working form from one of the tasks and modifying it, giving it its own config-tag or added it to one existing one under the task's forms-tag, but nothing seems to work - at all. Whatever I do, no changes appear.
My main expectation is to having at least something appear, but no visible changes can be detected. I found this post:
Alfresco: Hide "General Info" section in workflow-details form
where the person in question at least managed to achieve some differences this way. I also want to modify the general-info, but that is another matter for another day. For the moment, I want to be able to modify the form displayed.
Apart from this, I wonder - most instructions on how to achieve this is very sparse. Most just seem to say "add a form with id=workflow-details to a task config-tag", and the form should appear once that specific task has been completed.
My questions are the following:
Apart from using a form with id="workflow-details" and adding it to a task's config-tag, is there anything more to it, in order to make it work?
Is there a way to make the form in question appear no matter the latest task?
** EDIT **
This is the latest code, unfiltered and cut straight from share-config-custom.xml.
<config evaluator="task-type" condition="cmpny:workflowModel_acceptreject">
<forms>
<form id="workflow-details">
<field-visibility>
<show id="cmpny:processId0" />
<show id="cmpny:title0" />
<show id="cmpny:description0" />
<show id="packageItems" />
<show id="cmpny:reason0"/>
<show id="cmpny:granskningsretur0"/>
<show id="cmpny:deadline0" />
<show id="cmpny:customReviewOutcome0"/>
</field-visibility>
<appearance>
<set id="" appearance="title" label="Översikt" />
<set id="main" appearance="title" label="Beskrivning" />
<set id="items" appearance="title" label="Information" />
<set id="other" appearance="title" label="Beslut" />
<field id="cmpny:processId0" set="main" label="Process-ID"><control template="/org/alfresco/components/form/controls/info.ftl"/></field>
<field id="cmpny:title0" set="main" label="Uppgiftsrubrik"><control template="/org/alfresco/components/form/controls/info.ftl"/></field>
<field id="cmpny:description0" set="main" label="Meddelande"><control template="/org/alfresco/components/form/controls/info.ftl"/></field>
<field id="packageItems" set="main" label="Bifogade Filer"/>
<field id="cmpny:reason0" set="main" label="Kommentar">
<control
template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="rows">4</control-param>
<control-param name="columns">8</control-param>
<control-param name="maxLength">5000</control-param>
</control>
</field>
<field id="cmpny:deadline0" set="items" label="Förfallodatum"><control template="/org/alfresco/components/form/controls/info.ftl"/></field>
<field id="cmpny:granskningsretur0" set="items" label="Granskning begärd"><control template="/org/alfresco/components/form/controls/info.ftl"/></field>
<field id="cmpny:customReviewOutcome0" label="Utfall" set="other">
<control template="/org/alfresco/components/form/controls/workflow/activiti-transitions.ftl" />
</field>
</appearance>
</form>
<form>
<field-visibility>
<show id="cmpny:processId0" />
<show id="cmpny:title0" />
<show id="cmpny:description0" />
<show id="packageItems" />
<show id="cmpny:reason0"/>
<show id="cmpny:granskningsretur0"/>
<show id="cmpny:deadline0" />
<show id="cmpny:customReviewOutcome0"/>
</field-visibility>
<appearance>
<set id="" appearance="title" label="Översikt" />
<set id="main" appearance="title" label="Beskrivning" />
<set id="items" appearance="title" label="Information" />
<set id="other" appearance="title" label="Beslut" />
<field id="cmpny:processId0" set="main" label="Process-ID"><control template="/org/alfresco/components/form/controls/info.ftl"/></field>
<field id="cmpny:title0" set="main" label="Uppgiftsrubrik"><control template="/org/alfresco/components/form/controls/info.ftl"/></field>
<field id="cmpny:description0" set="main" label="Meddelande"><control template="/org/alfresco/components/form/controls/info.ftl"/></field>
<field id="packageItems" set="main" label="Bifogade Filer"/>
<field id="cmpny:reason0" set="main" label="Kommentar">
<control
template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="rows">4</control-param>
<control-param name="columns">8</control-param>
<control-param name="maxLength">5000</control-param>
</control>
</field>
<field id="cmpny:deadline0" set="items" label="Förfallodatum"><control template="/org/alfresco/components/form/controls/info.ftl"/></field>
<field id="cmpny:granskningsretur0" set="items" label="Granskning begärd"><control template="/org/alfresco/components/form/controls/info.ftl"/></field>
<field id="cmpny:customReviewOutcome0" label="Utfall" set="other">
<control template="/org/alfresco/components/form/controls/workflow/activiti-transitions.ftl" />
</field>
</appearance>
</form>
</forms>
</config>
Screenshot (Only one, but the workflow-details-tag literally makes ZERO difference - screenshots are identical down to the pixel).
Perhaps at least worth mentioning is that I've also meddled some with the webscript, but I've checked that it isn't the cause.
Screenshot link here, can't add it directly apparently
I've tried multiple combinations, putting it in different tasks, shaving the parameters down to a bare minimum - nothing works. To just make it clear - ANY difference is what I'm aiming for at the moment - just getting anything to stick.
** EDIT 2 **
Clarified screenshot here.
Second, enhanced screenshot

This is the way you can add items in workflow details page
<field-visibility>
<show id="someWorkflow:VersionNumber" />
</field-visibility>
<appearance>
<set id="docSubDetails" label="Document Details"
template="/org/alfresco/components/form/2-column-set.ftl"/>
</appearance>
or Hide
<field-visibility>
<hide id="someWorkflow:VersionNumber" />
</field-visibility>
Full code
<config evaluator="task-type" condition="someWorkflow:peerReviewerTask">
<forms>
<form>
<field-visibility>
<show id="someWorkflow:VersionNumber" />
<show id="someWorkflow:documentLocation" />
<show id="someWorkflow:documentName" />
<show id="someWorkflow:author" />
<show id="bpm:assignees" />
<show id="bpm:comment" />
<show id="someWorkflow:peerReviewTaskOutcome" />
</field-visibility>
<appearance>
<set id="docSubDetails" label="Document Details" template="/org/alfresco/components/form/2-column-set.ftl"/>
<set id="docAuthor" appearance="title" label="" template="/org/alfresco/components/form/2-column-set.ftl"/>
<field id="someWorkflow:VersionNumber" set="docSubDetails" read-only="true"/>
<field id="someWorkflow:documentLocation" set="docSubDetails" read-only="true"/>
<field id="someWorkflow:documentName" set="docSubDetails" read-only="true"/>
<field id="someWorkflow:author" set="docAuthor" label="Author" read-only="true"/>
<field id="bpm:assignees" set="docAuthor" label="QC Reviewer(s)" read-only="true"/>
</field>
</appearance>
</form>
<form id="workflow-details">
<field-visibility>
<show id="someWorkflow:VersionNumber" />
<show id="someWorkflow:documentLocation" />
<show id="someWorkflow:documentName" />
<show id="someWorkflow:author" />
<show id="bpm:assignees" />
<show id="bpm:comment" />
<show id="someWorkflow:peerReviewTaskOutcome" />
</field-visibility>
<appearance>
<set id="docSubDetails" label="Document Details" template="/org/alfresco/components/form/2-column-set.ftl"/>
<set id="docAuthor" appearance="title" label="" template="/org/alfresco/components/form/2-column-set.ftl"/>
<field id="someWorkflow:VersionNumber" set="docSubDetails" read-only="true"/>
<field id="someWorkflow:documentLocation" set="docSubDetails" read-only="true"/>
<field id="someWorkflow:documentName" set="docSubDetails" read-only="true"/>
<field id="someWorkflow:author" set="docAuthor" label="Author" read-only="true"/>
<field id="bpm:assignees" set="docAuthor" label="QC Reviewer(s)" read-only="true"/>
</appearance>
</form>
</forms>
</config>

Workflow summary displays workflow / task details from start-task details only. So I have shared workflow model and share configuration also.
Workflow Model
<?xml version='1.0' encoding='UTF-8'?>
<model xmlns='http://www.alfresco.org/model/dictionary/1.0' name='workflowns:model'>
<version>1.0</version>
<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
<import uri="http://www.alfresco.org/model/site/1.0" prefix="st"/>
<import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm" />
</imports>
<namespaces>
<namespace uri="workflowns.model" prefix="workflowns"/>
</namespaces>
<types>
<type name="workflowns:Form0">
<title>Initiator Task</title>
<parent>bpm:startTask</parent>
<mandatory-aspects>
<aspect>bpm:assignee</aspect>
<aspect>workflowns:reviewerAspect</aspect>
<aspect>workflowns:approverAspect</aspect>
<aspect>workflowns:finalapproverAspect</aspect>
<aspect>workflowns:notesLabel</aspect>
<aspect>workflowns:Aspect1</aspect>
<aspect>workflowns:Aspect3</aspect>
</mandatory-aspects>
</type>
....
</model>
Share Custom Configuration
<!-- Workflow details page-->
<config evaluator="task-type" condition="workflowns:startTask">
<forms>
<form>
<field-visibility>
<show id="workflowns:documentname" />
<show id="workflowns:documentversion" />
<show id="workflowns:pathorlinktothedocument" />
<show id="workflowns:customerno" />
<show id="workflowns:projectno" />
<show id="workflowns:author" />
<show id="workflowns:reviewer" />
<show id="workflowns:approver" />
<show id="workflowns:finalapprover" />
<show id="workflowns:initiatorcomment" />
<show id="bpm:taskId" />
<show id="bpm:status" />
</field-visibility>
<appearance>
<set id="docDetails" appearance="title" label="Document Details"/>
<set id="docSubDetails" label="" template="/org/alfresco/components/form/2-column-set.ftl"/>
<set id="docAuthor" appearance="title" label="Author" template="/org/alfresco/components/form/2-column-set.ftl"/>
<set id="docReviewer" appearance="title" label="Reviewers" template="/org/alfresco/components/form/2-column-set.ftl"/>
<set id="docApprover" appearance="title" label="Approvers" template="/org/alfresco/components/form/2-column-set.ftl"/>
<set id="docFinalapprover" appearance="title" label="Final Approvers" template="/org/alfresco/components/form/2-column-set.ftl"/>
<field id="workflowns:documentname" set="docDetails" label="Document Name">
</field>
<field id="workflowns:documentversion" set="docDetails" label="Document Version">
</field>
<field id="workflowns:pathorlinktothedocument" set="docDetails" label="Path or Link to the document">
</field>
<field id="workflowns:customerno" set="docSubDetails" label="Customer Number">
</field>
<field id="workflowns:projectno" set="docSubDetails" label="Project Number">
</field>
<field id="workflowns:author" set="docAuthor" label="Author">
</field>
<field id="workflowns:reviewer" set="docReviewer" label="Reviewer">
</field>
<field id="workflowns:approver" set="docApprover" label="Approver">
</field>
<field id="workflowns:finalapprover" set="docFinalapprover" label="Final Approver">
</field>
</appearance>
</form>
</forms>
</config>
Hope this helps you.

Related

FIX 4.2 Tag Not Defined

20180216-17:21:04.640 : 8=FIX.4.2;9=115;35=V;34=3;49=SNDJ;52=20180216-17:21:04.640;56=BROKER;55=EUR/USD;146=1;262=676;263=1;264=1;265=1;266=Y;267=1;269=0;10=061;
20180216-17:21:04.641 : 8=FIX.4.2;9=119;35=3;34=3;49=BROKER;52=20180216-17:21:04.641;56=SNDJ;45=3;58=Tag not defined for this message type;371=55;372=V;373=2;10=237;
I receive 'tag not defined for this message type' rejects (35=3) when attempting to send 35=V messages. I have added and removed ValidateUserDefinedFields, ValidateFieldsOutOfOrder.
I have razed the group structure, re-added it, redefined both Symbol and NoRelatedSym types (to string, symbol, int, numingroup etc.), changed the symbol being sent to EURUSD, TEST, etc. and nothing works.
Have I missed something very simple here? It seems related to the fact that the request message puts the symbol tag ahead of the group, but I do not know why.
MarketDataRequest.h:
FIELD_SET(*this, FIX::NoRelatedSym);
class NoRelatedSym: public FIX::Group
{
public:
NoRelatedSym() :
FIX::Group(146,55,FIX::message_order(55,65,48,22,167,200,205,201,2
02,206,231,223,207,106,348,349,107,350,351,336,0)) {}
FIELD_SET(*this, FIX::Symbol);
....
};
My current FIX 4.2 .xml set up for MarketDataRequest messages looks like:
<message name='MarketDataRequest' msgtype='V' msgcat='app'>
<field name='MDReqID' required='Y' />
<field name='SubscriptionRequestType' required='Y' />
<field name='MarketDepth' required='Y' />
<field name='MDUpdateType' required='N' />
<field name='AggregatedBook' required='N' />
<group name='NoMDEntryTypes' required='Y'>
<field name='MDEntryType' required='Y' />
</group>
<group name='NoRelatedSym' required='Y'>
<field name='Symbol' required='Y' />
<field name='SymbolSfx' required='N' />
<field name='SecurityID' required='N' />
<field name='IDSource' required='N' />
<field name='SecurityType' required='N' />
<field name='MaturityMonthYear' required='N' />
<field name='MaturityDay' required='N' />
<field name='PutOrCall' required='N' />
<field name='StrikePrice' required='N' />
<field name='OptAttribute' required='N' />
<field name='ContractMultiplier' required='N' />
<field name='CouponRate' required='N' />
<field name='SecurityExchange' required='N' />
<field name='Issuer' required='N' />
<field name='EncodedIssuerLen' required='N' />
<field name='EncodedIssuer' required='N' />
<field name='SecurityDesc' required='N' />
<field name='EncodedSecurityDescLen' required='N' />
<field name='EncodedSecurityDesc' required='N' />
<field name='TradingSessionID' required='N' />
</group>
</message>
Configuration Settings:
[DEFAULT]
BeginString=FIX.4.2
ReconnectInterval=60
SocketAcceptPort=7091
SenderCompID=SNDJ
TargetCompID=BROKER
SocketNodelay=Y
PersistMessage=Y
FileStorePath=cache
FileLogPath=log
[SESSION]
ConnectionType=acceptor
StartTime=00:30:00
EndTime=23:30:00
ReconnectInterval=30
HeartBtInt=15
SocketAcceptPort=7091
SocketReuseAddress=Y
DataDictionary=spec/FIX42.xml
AppDataDictionary=spec/FIX42.xml
SenderCompID=BROKER
TargetCompID=SNDJ
FileStorePath=cache
FileLogPath=log
[SESSION]
BeginString=FIX.4.2
ConnectionType=initiator
StartTime=00:30:00
EndTime=23:30:00
ReconnectInterval=15
HeartBtInt=15
SocketConnectPort=7091
SocketConnectHost=127.0.0.1
DataDictionary=spec/FIX42.xml
AppDataDictionary=spec/FIX42.xml
SenderCompID=SNDJ
TargetCompID=BROKER
FileStorePath=cache
FileLogPath=log
Thanks
The message that you are sending is invalid per your own DD.
Look at the first body fields after the header ends:
55=EUR/USD;146=1;262=676;...
That 55 field is supposed to be inside the 146 repeating group, but its placement puts it prior to the group.
I suspect your config may be to blame. If you update your question to include the config, I will probably be able to see what's wrong and update this answer.
UPDATE:
You are missing UseDataDictionary=Y from your config, though that's not the cause of your problem. (You need it to receive messages correctly, though.)
Also, you don't need AppDataDictionary -- that's only for FIX 5+.

Getting a JSONParseException when indexing fields from MongoDB collection in SOLR using DataImportHandler

I am seeing this exception while I am trying to index data from MongoDB collection :
Exception while processing: products document : SolrInputDocument(fields: []):org.apache.solr.handler.dataimport.DataImportHandlerException: com.mongodb.util.JSONParseException:
{idStr,name,code,description,price,brand,size,color}
^
at org.apache.solr.handler.dataimport.MongoEntityProcessor.initQuery(MongoEntityProcessor.java:46)
at org.apache.solr.handler.dataimport.MongoEntityProcessor.nextRow(MongoEntityProcessor.java:54)
at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:244)
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:476)
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:415)
at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:481)
at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:462)
Caused by: com.mongodb.util.JSONParseException:
{idStr,name,code,description,price,brand,size,color}
^
at com.mongodb.util.JSONParser.parseString(JSON.java:387)
Following is my data-source-config file in dataimport directory in conf folder of my core :
<dataConfig>
<dataSource name="mymongodb" type="MongoDataSource" database="mongodb://*.*.*.*/testdb" />
<document name="data">
<entity
name="products"
processor="MongoEntityProcessor"
query="{idStr,name,code,description,price,brand,size,color}"
collection="products"
datasource="mymongodb"
transformer="MongoMapperTransformer" >
<field column="idstr" name="idstr" mongoField="idStr"/>
<field column="name" name="name" mongoField="name"/>
<field column="code" name="code" mongoField="code"/>
<field column="description" name="description" mongoField="description"/>
<field column="price" name="price" mongoField="price"/>
<field column="brand" name="brand" mongoField="brand"/>
<field column="size" name="size" mongoField="size"/>
<field column="color" name="color" mongoField="color"/>
<entity
name="categories"
processor="MongoEntityProcessor"
query="{'idStr':'${categories.idstr}'}"
collection="categories"
datasource="mymongodb"
transformer="MongoMapperTransformer">
<field column="type" name="type" mongoField="type"/>
</entity>
</entity>
</document>
</dataConfig>
I am trying to join the field idStr of categories collection with the idStr of products collection(field name => idstr) and get the above fields ( name,description,... from products and type field from categories).
Any comments/solution on this exception would be really appreciated.Thanks!
Your SOLR field is declared as idstr but you are referencing it in the query attribute of dataConfig as idStr (camelcase difference).
I was able to resolve this ...
Following is the working configuration in the data-source-config file :
<entity
name="products"
query="select idStr,name,code,description,price,brand,size,color from products">
<field name="prodidStr" column="idStr" />
<field name="name" column="name" />
<field name="code" column="name" />
<field name="description" column="description" />
<field name="price" column="price" />
<field name="brand" column="brand" />
<field name="size" column="size" />
<field name="color" column="color" />
<entity
name="categories"
dataSource="mongod"
query="select idStr,ancestors from categories where idStr = '${products.idStr}'">
<field name="catidStr" column="idStr" />
<field name="ancestors" column="ancestors" />
</entity>
</entity>

ExceptionActiviti: unknown property used in expression

sI use activiti for my workflow on alfresco 4.2.c. I want to assign to a group from my form selection. But when I press submit task it throws an exception: org.activiti.engine.ActivitiException: Unknown property used in expression
My activiti is:
<userTask id="kiemtranoidungthethuc" name="Kiểm tra nội dung, thể thức VB- Chuyển cho phòng TCHC" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="wfdi:kiemtranoidungthethucTask_tc">
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate;
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
</activiti:string>
</activiti:field>
</activiti:taskListener>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
execution.setVariable('wfdi_userVanthu', person);
execution.setVariable('wfdi_chapthuan_tc', task.getVariable('wfdi_chapthuan_tc'));
<!-- execution.setVariable('bpm_assignee', person);-->
execution.setVariable('bpm_dueDate', task.getVariable('dueDate'));
execution.setVariable('bpm_priority', task.priority);
execution.setVariable('bpm_groupAssignee',task.bpm_groupAssignee);
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<userTask id="kiemtrathethucchuky" name="Phòng TCHC - Kiểm tra thể thức, chữ ký - Chuyển cho BGH"
activiti:candidateGroups="${bpm_groupAssignee.properties.authorityName}" activiti:formKey="wfdi:kiemtrathethucchukyTask_tc">
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate;
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_priority;
<!-- if (typeof bpm_comment != 'undefined') task.setVariable('bpm_comment', bpm_comment);-->
</activiti:string>
</activiti:field>
</activiti:taskListener>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
execution.setVariable('wfdi_kiemtra_tc', task.getVariable('wfdi_kiemtra_tc'));
execution.setVariable('bpm_dueDate', task.getVariable('dueDate'));
execution.setVariable('bpm_priority', task.priority);
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
My form is:
<config evaluator="task-type" condition="wfdi:kiemtranoidungthethucTask_tc">
<forms>
<form>
<field-visibility>
<show id="message" />
<show id="taskOwner" />
<show id="bpm:priority" />
<show id="bpm:dueDate" />
<show id="bpm:taskId" />
<show id="packageItems" />
<show id="bpm:groupAssignee" />
<show id="bpm:comment" />
<show id="wfdi:chapthuan_tc" />
</field-visibility>
<appearance>
<set id="" appearance="title" label-id="workflow.set.task.info" />
<set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl" />
<set id="items" appearance="title" label-id="workflow.set.items" />
<set id="assignee" appearance="title" label-id="workflow.set.assignee" />
<set id="response" appearance="title" label-id="workflow.set.response" />
<field id="message">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="taskOwner" set="info" />
<field id="bpm:taskId" set="info">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="bpm:priority" set="info" read-only="true">
<control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
</field>
<field id="bpm:dueDate" set="info" label-id="workflow.field.due">
<control template="/org/alfresco/components/form/controls/info.ftl" />
</field>
<field id="packageItems" set="items" />
<field id="bpm:groupAssignee" label-id="workflow.field.review_group" set="assignee" />
<field id="bpm:comment" label-id="workflow.field.comment" set="response">
<control template="/org/alfresco/components/form/controls/textarea.ftl" />
</field>
<field id="wfdi:chapthuan_tc" label-id="workflow.field.outcome" set="response">
<control template="/org/alfresco/components/form/controls/workflow/activiti-transitions.ftl" />
</field>
</appearance>
</form>
</forms>
My model is:
<type name="wfdi:kiemtranoidungthethucTask_tc">
<parent>bpm:workflowTask</parent>
<properties>
<property name="wfdi:chapthuan_tc">
<type>d:text</type>
<default>Tu_Choi</default>
<constraints>
<constraint name="wfdi:chapthuanOption_tc" type="LIST">
<parameter name="allowedValues">
<list>
<value>Chuyen_Phong_TCHC</value>
<value>Tu_Choi</value>
</list>
</parameter>
</constraint>
</constraints>
</property>
</properties>
<overrides>
<property name="bpm:packageItemActionGroup">
<default>edit_package_item_actions</default>
</property>
<property name="bpm:outcomePropertyName">
<default>{http://www.alfresco.org/model/workflow/1.0}chapthuan</default>
</property>
</overrides>
<mandatory-aspects>
<aspect>bpm:groupAssignee</aspect>
</mandatory-aspects>
I know the problem is: activiti:candidateGroups="${bpm_groupAssignee.properties.authorityName}"
but I don't know how to fix it.
Can anybody help me?
Thank in advance.

Edit task workflow FORM change

I have created my own custom workflow (for now this is just adhoc workflow customization) and i have managed to customize start workflow form, however a can not customize second form, this is edit task form (when user start process and assign to "someone", "someone" get task in inbox and he see edit task form). This second form is the same as my first plus some extra fields. This is because i need that "someone" can view and edit data entered on start workflow form. So i basically copied first form configuration to second form but this doesn't work, only sets and textareas are rendered. Anybody now how can i customize this?
workflow definition
<process id="appppV1" name="Proces otvaranja projekta">
<startEvent id="start" name="Start" activiti:formKey="mcwm:submitStart"></startEvent>
<userTask id="preparationOfProjectCharter" name="Priprema projektne povelje" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="mcwm:preparationOfProjectCharter">
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate);</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
model for workflow:
<types>
<type name="mcwm:submitStart">
<parent>bpm:startTask</parent>
<properties>
<property name="mcwm:projectName">
<title>Naziv projekta</title>
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="mcwm:shortProjectName">
<title>Skraćeni naziv projekta</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="mcwm:projectOrderer">
<title>Naručitelj projekta</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="mcwm:shortProjectOrderer">
<title>Skraćeni naziv naručitelja projekta</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="mcwm:isoProcess">
<title>ISO 9000 proces</title>
<type>d:text</type>
<mandatory>true</mandatory>
<default> </default>
<constraints>
<constraint name="mcwm:isoProcessChoices" type="LIST">
<parameter name="allowedValues">
<list>
<value> </value>
<value>održavanje - aplikativno</value>
<value>održavanje - sistemsko</value>
<value>konsalting</value>
<value>razvoj - sa odobrenjem arhitekture</value>
<value>razvoj - bez odobrenjem arhitekture</value>
<value>mali razvoj</value>
<value>implementacija</value>
</list>
</parameter>
</constraint>
</constraints>
</property>
<property name="mcwm:reporting">
<title>Učestalost izveštavanja</title>
<type>d:text</type>
<mandatory>true</mandatory>
<default>mesečno</default>
<constraints>
<constraint name="mcwm:reportingChoices" type="LIST">
<parameter name="allowedValues">
<list>
<value>mesečno</value>
<value>kvartalno</value>
<value>po okončanju</value>
</list>
</parameter>
</constraint>
</constraints>
</property>
<property name="mcwm:projectGoals">
<title>Ciljevi projekta</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="mcwm:beginDate">
<title>Datum početka projekta</title>
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="mcwm:endDate">
<title>Datum okončanja projekta</title>
<type>d:date</type>
<mandatory>false</mandatory>
</property>
<property name="mcwm:team">
<title>Projektni tim (*promena tipa kontorle)</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="mcwm:teamResource">
<title>Predviđeni utrošak ljudskih resursa (*promena tipa kontorle)</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="mcwm:teamComent">
<title>Komentar na predviđeni utrošak ljudskih resursa</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="mcwm:changeComent">
<title>Komentar izmene</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
</properties>
<!-- To select a user -->
<mandatory-aspects>
<aspect>bpm:assignee</aspect>
</mandatory-aspects>
</type>
<type name="mcwm:preparationOfProjectCharter">
<parent>bpm:workflowTask</parent>
<properties>
<property name="mcwm:editTask">
<title>Edit task</title>
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>
share-config-custom.xml
<config evaluator="string-compare" condition="activiti$appppV1">
<forms>
<form>
<field-visibility>
<hide id="bpm:workflowDescription" />
<hide id="bpm:workflowDueDate" />
<hide id="bpm:workflowPriority" />
<show id="bpm:assignee" />
<show id="mcwm:projectName" />
<show id="mcwm:shortProjectName" />
<show id="mcwm:projectOrderer" />
<show id="mcwm:shortProjectOrderer" />
<show id="mcwm:isoProcess" />
<show id="mcwm:reporting"/>
<show id="mcwm:projectGoals"/>
<show id="mcwm:beginDate"/>
<show id="mcwm:endDate"/>
<show id="mcwm:team"/>
<show id="mcwm:teamResource"/>
<show id="mcwm:teamComent"/>
<show id="mcwm:changeComent"/>
<hide id="packageItems" />
<hide id="bpm:sendEMailNotifications" />
</field-visibility>
<appearance>
<set id="" appearance="title" label-id="apppv1.set.projekat" />
<set id="general" appearance="fieldset" label-id="appppV1.set.general" />
<set id="date" template="/org/alfresco/components/form/2-column-set.ftl" appearance="fieldset" label-id="appppV1.set.date" />
<set id="team" appearance="fieldset" label-id="appppV1.set.team" />
<set id="change" appearance="fieldset" label-id="appppV1.set.change" />
<field id="mcwm:projectName" set="general" />
<field id="mcwm:shortProjectName" set="general" />
<field id="mcwm:projectOrderer" set="general" />
<field id="mcwm:shortProjectOrderer" set="general" />
<field id="mcwm:isoProcess" set="general" />
<field id="mcwm:reporting" set="general" />
<field id="mcwm:projectGoals" set="general">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 65%</control-param>
<control-param name="rows">5</control-param>
</control>
</field>
<field id="mcwm:beginDate" set="date"/>
<field id="mcwm:endDate" set="date"/>
<field id="bpm:assignee" set="team" label="Voditelj projekta"/>
<field id="mcwm:team" set="team">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 65%</control-param>
<control-param name="rows">5</control-param>
</control>
</field>
<field id="mcwm:teamResource" set="team"/>
<field id="mcwm:teamComent" set="team">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 65%</control-param>
<control-param name="rows">5</control-param>
</control>
</field>
<field id="mcwm:changeComent" set="change">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 65%</control-param>
<control-param name="rows">5</control-param>
</control>
</field>
</appearance>
</form>
</forms>
share-config-custom.xml - second form
<config evaluator="task-type" condition="mcwm:preparationOfProjectCharter">
<forms>
<form>
<field-visibility>
<show id="mcwm:projectName"/>
<show id="mcwm:editTask"/>
<hide id="bpm:workflowDescription" />
<hide id="bpm:workflowDueDate" />
<hide id="bpm:workflowPriority" />
<show id="bpm:assignee" />
<show id="mcwm:projectName" />
<show id="mcwm:shortProjectName" />
<show id="mcwm:projectOrderer" />
<show id="mcwm:shortProjectOrderer" />
<show id="mcwm:isoProcess" />
<show id="mcwm:reporting"/>
<show id="mcwm:projectGoals"/>
<show id="mcwm:beginDate"/>
<show id="mcwm:endDate"/>
<show id="mcwm:team"/>
<show id="mcwm:teamResource"/>
<show id="mcwm:teamComent"/>
<show id="mcwm:changeComent"/>
</field-visibility>
<appearance>
<set id="" appearance="title" label-id="apppv1.set.projekat" />
<set id="general" appearance="fieldset" label-id="appppV1.set.general" />
<set id="date" template="/org/alfresco/components/form/2-column-set.ftl" appearance="fieldset" label-id="appppV1.set.date" />
<set id="team" appearance="fieldset" label-id="appppV1.set.team" />
<set id="change" appearance="fieldset" label-id="appppV1.set.change" />
<field id="mcwm:projectName" set="general" />
<field id="mcwm:shortProjectName" set="general" />
<field id="mcwm:projectOrderer" set="general" />
<field id="mcwm:shortProjectOrderer" set="general" />
<field id="mcwm:isoProcess" set="general" />
<field id="mcwm:reporting" set="general" />
<field id="mcwm:projectGoals" set="general">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 65%</control-param>
<control-param name="rows">5</control-param>
</control>
</field>
<field id="mcwm:beginDate" set="date"/>
<field id="mcwm:endDate" set="date"/>
<field id="bpm:assignee" set="team" label="Voditelj projekta"/>
<field id="mcwm:team" set="team">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 65%</control-param>
<control-param name="rows">5</control-param>
</control>
</field>
<field id="mcwm:teamResource" set="team"/>
<field id="mcwm:teamComent" set="team">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 65%</control-param>
<control-param name="rows">5</control-param>
</control>
</field>
<field id="mcwm:changeComent" set="change">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 65%</control-param>
<control-param name="rows">5</control-param>
</control>
</field>
<field id="mcwm:editTask" set="general" read-only="true"/>
</appearance>
</form>
</forms>
I try to use in show tag with force="true" attribute and this show my filed but data aren't transfered from my start from?!
Thanks in advance for help.
Regards,
Aleksandar
I think that you are not seeing any fields because mcwm:preparationOfProjectCharter task has no properties that you are trying to display.
If you want the same properties on second task that you have on first task you will have to define them in your task model.
If the properties are exactly the same and repeating a lot, you can specify them as an aspect and add them as mandatory aspect in task model.
Thanks for your help. :) I done something quite similar. I just set on my second task that parent is first task
<type name="mcwm:preparationOfProjectCharter">
<parent>mcwm:submitStart</parent>
and now i have all property from first task on my second task.
Regards,
Aleksandar

How to show/hide fields in simple edit metadata form

In the share-config-custom.xml i've defined the following:
<config evaluator="node-type" condition="zk:document">
<forms>
<form>
<field-visibility>
<show id="cm:name" />
<show id="cm:description" force="true" />
<show id="zk:nummer" />
<show id="zk:registratieDatum" />
<show id="zk:zaakType" />
<show id="zk:documentType" />
<show id="zk:vertrouwelijkheid" />
<show id="zk:richting" />
<show id="zk:subject" />
<show id="zk:object" />
<show id="zk:perceel" />
<show id="cm:taggable" for-mode="edit" force="true" />
</field-visibility>
<appearance>
</appearance>
</form>
</forms>
</config>
The form shows fine in View and Edit(full metadata edit), but in simple edit mode (on docLibrary --> edit metadata) I'm getting too many fields.
I want only to show a couple of fields in simple mode and the full stack in full mode.
How can I achieve this? e.g. like the cm:content in simple mode only name, title & description and in Full mode the full stack.
Very simple to reproduce this:
- Start Alfresco
- Add a content
- click on edit-metadata (in docLib), you will see a simple edit form
- click on the upper-right corner, you will see a full edit form
My question:
- How can I configure the simple edit form?
Thanks!
Have a look at the original share form config: tomcat/webapps/share/WEB-INF/classes/alfresco/share-form-config.xml
There you can see that the simple metadata dialog has a separate form definition. It can be set by using the form id="doclib-simple-metadata" in addition to the normal form that you already have defined.
<config evaluator="node-type" condition="zk:document">
<forms>
<form>.... your full form here....</form>
<form id="doclib-simple-metadata">
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
<!-- tags and categories -->
<show id="cm:taggable" for-mode="edit" force="true" />
<show id="cm:categories" />
</field-visibility>
</form>
</forms>
</config>
you need to add another formid (doclib-simple-metadata):
<form id="doclib-simple-metadata">
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
<!-- tags and categories -->
<show id="cm:taggable" for-mode="edit" force="true" />
<show id="cm:categories" />
</field-visibility>
<edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl" />
<appearance>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="cm:description">
<control>
<control-param name="activateLinks">true</control-param>
</control>
</field>
<field id="cm:taggable">
<control>
<control-param name="compactMode">true</control-param>
<control-param name="params">aspect=cm:taggable</control-param>
<control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
<control-param name="createNewItemIcon">tag</control-param>
</control>
</field>
<field id="cm:categories">
<control>
<control-param name="compactMode">true</control-param>
</control>
</field>
</appearance>
</form>
Cheers, jan (#alfrescian)