SAP Flexible Workflow pre-condition value not loaded in edit mode - workflow

I've created a new pre-condition field in Workflow Flexible called Transfer Type with default domain values (T/B).
When I save the WF with T or B in this field it's OK, the value is saved.
But when I try to edit this workflow the value is cleared and we need to fill again the Transfer Type.
Question to the experts, how can I recover the value saved before in this field?
Thank you in advance!
In the OData field map:
/sap/opu/odata/sap/ZWF_FI_SEARCH_HELP_CDS/?$format=xml
<app:collection sap:creatable="false" sap:updatable="false" sap:deletable="false"
sap:searchable="true" sap:content-version="1" href="zC_FI_Transfer_Type">
<atom:title type="text">zC_FI_Transfer_Type</atom:title>
<sap:member-title>Check Budget</sap:member-title>
<atom:link href="zC_FI_Transfer_Type/OpenSearchDescription.xml" rel="search"
type="application/opensearchdescription+xml" title="searchzC_FI_Transfer_Type" />
</app:collection>
In SPRO path:

Related

Can we hide system default fields from workItem form?

Can we be able to hide the system defaults fields on the workitem form?
For TFS 2017, On-premises XML process model: You can modify select elements within the SystemControls section, such as changing the EmptyText attribute value for the System.Title field. In general, we recommend you don't customize this section much more than that. For example, you can't remove fields from or add other fields within this section.
For TFS 2018, On-premises XML and Azure DevOps Services, Hosted XML process models: You can specify the ShowEmptyReadOnlyFields attribute, or select to hide or replace select fields defined within the SystemControls section.
For example, to hide the Reason field, you modify the Control element with the Visible attribute.
<Control Label="Reason" Type="FieldControl" FieldName="System.Reason" Visible="false" />
To replace the Reason field with another field, use the Replaces attribute. Also, remove the entry for the Reason field from within the section.
<Control Label="Milestone" Type="FieldControl" FieldName="Fabrikam.Milestone" Replaces="System.Reason" />
See more info in the docs.
If the process you are using is a custom process inherited from the template process, normally you can't hidden the default fields.
If your process is defined using a XML process model, as #ShaykiAbramczyk suggested, you can try to edit the XML file for the process definition to hidden the fields.

Alfresco Workflow form save and close

I have custom workflow where some fields are mandatory.Whenever I am saving that form,I need to fill all the mandatory field,
Is there any way where I can save form without filling mandatory field?
You should fill the mandatory field if you have some back end logic to continue the flow after verifying that mandatory field is not null.
Otherwise you can edit mandatory tag in your respective workflow-model.xml with some like below.
<target>
<class>cm:person</class>
<mandatory>false</mandatory>
<many>false</many>
</target>
But this will work only if you have unaffeccted user or service task.
Other solution could be hard coding default values in .bpmn file

Problem with rule validation - valid on save, invalid on load

While testing the unchanged CodeEffects asp.net core demo application (Editor 5.0.4.8, Engine 5.0.2.6) I've found an interesting problem.
If I create an execution rule that checks for example if FirstName contains two spaces, I can save this rule without a problem, and in SaveRule action it passes the validation using editor.Rule.IsValid. Here is an example of the rule definition:
<if>
<clause>
<condition type="contains" stringComparison="OrdinalIgnoreCase">
<property name="FirstName" />
<value> </value>
</condition>
</clause>
<then>
<method name="Register">
<value>aaaa</value>
</method>
</then>
</if>
But when refreshing the editor and trying to load this saved rule it won't load into editor. The reason is that the LoadRule controller action returns empty json.
While investigating this further it looks that the editor.GetClientRuleData returns null because the rule is invalid. If I check editor.Rule.IsValid just before calling editor.GetClientRuleData I can see it return false and the editor.Rule.InvalidElements holds one element:
{{c:"",h:"v120"}}
The error message would be "The only allowed operators for empty string values are IS and IS NOT" but of course it's not shown in the editor in the demo project as this is not expected to happen.
Not sure if this is in any way related to the problem, but one obvious difference between LoadRule and SaveRule actions is how the rule is loaded.
When saving the rule, the rule data (coming from the UI) is loaded into editor with
editor.LoadClientData(data.Data);
and when loading the rule it's loaded using the xml (from the storage) effectively calling this:
editor.Rule = Rule.Models.RuleModel.Create(ruleXml, typeof(Models.Patient))
So my question is why can invalid rule pass the validation on save, and then the same rule fails the validation on load? Any fix I can try or a workaround?
This issue has been fixed in the latest version of Rule Editor. You need to update Code Effects references from NuGet:
CodeEffects.Rule.Common - 5.0.2.4, CodeEffects.Rule.Editor.Core - 5.0.4.1 (this is the assembly that contains that fix), CodeEffects.Rule.Editor.Web.Core - 5.0.4.8

ej-autocomplete passing text not value

I am trying to write a control that takes a list of names, allows the user to select from this list and then posts back the username for the name that has been selected.
Firstly, I used a Syncfusion ejDropDownList control to accomplish this, where the code I used was:
<ej-drop-down-list id="UserList" datasource="(IEnumerable<User>)ViewBag.Users" ej-for="Username">
<e-drop-down-list-fields text="Name" value="Username" />
</ej-drop-down-list>
This works fine and when I submit the form, the Username field is bound correctly in the associated model.
Since there are too many names in the list to realistically use a drop-down list, an autocomplete control is preferable.
However, when I implemented the control in the following manner:
<ej-autocomplete id="UserList" datasource="(IEnumerable<User>)ViewBag.Users" ej-for="Username" filter-type="Contains">
<e-autocomplete-fields text="Name" value="Username" />
</ej-autocomplete>
Then the 'Username' value in the model is bound to the 'Name' field.
Is anyone familiar with Syncfusion controls who can tell me how I can bind the selected value (as opposed to the selected text) to the 'Username' column successfully?
Thanks,
Sean
Syncfusion Autocomplete not have a field type of value. You can also use Key field for your scenario.<ej-autocomplete id="UserList" datasource="(IEnumerable<User>)ViewBag.Users" ej-for="Username" filter-type="Contains">
<e-autocomplete-fields text="Name" key="Username" />
</ej-autocomplete>
refer the documentation link: https://help.syncfusion.com/aspnetmvc/autocomplete/data-binding

Set request parameter in Orbeon

I am very new to Orbeon and XForms.
I have created a form with input field "BaseId"
<xf:input id="control-3-control" bind="control-3-bind">
<xf:label ref="$form-resources/control-3/label"/>
<xf:hint ref="$form-resources/control-3/hint"/>
<xf:help ref="$form-resources/control-3/help"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
and i want when i summit this form, in crud.xpl
method PUT i cant get value of BaseId through
<sql:param type="xs:string" select="/request/baseid"/>
Help me,please
Sorry for my bad English
The value of controls are passed to the persistence layer REST API in an XML document, as the body of the HTTP request. So in crud.xpl (say the one for eXist), this will be a document under /request/body. The exact path depends on your section and control name. For instance, if the section is named address and the field city, the value will be under /request/body/form/address/city.