How do you check several values in the Switch task of a workflow?


How can I check if a field has one among a set of values in the switch task of a workflow? For example, whether the field cstNameTX has either “a” or “b” or “c”? I tried the Switch task with the expression similar to the following, but it doesn’t work: cstNameTX == (“a” || “b” || “c”). Should I try the following expression: cstNameTX == “a” || cstNameTX==”b”, etc.? Is there a system function for this?

You can nest the switches instead of trying to have multiple entries in the expression…

[Admin: To see other related posts, use the Switch tag.]

Continue reading

Advertisements

UX: How do you create and save a record in UX via a workflow?


I’ve got most of this worked out. So I can trigger a workflow from a UX web page. But I am stuck on how to take data created in the UX application, feed it to the workflow, place that data into record fields, and then create a draft record. This is the UX code that is feeding data back to TRIRIGA. The data is valid. I am just stumped on how to feed it into a workflow. Any ideas?

var newRec = {
triHoursNU: vFixedTotal,
triControlNumberCN: triControlNumberCN,
triDateTX: mm + “/” + dd + “/” + yyyy, 
triIdTX: triIdTX,
triNameTX: fName + ” ” + lName
};
console.log(newRec);
this.$.timeLogQueryDs.createRecord(newRec, TriPlatDs.RefreshType.BOTH, 
“createLog”, “create” ) 
.then(function(){
this.$.toastBlue2.show(); 
}.bind(this));

 

When you create a record, let’s say you have a data source called “peopleDs”, you create an object and then pass it to the create method of the data source. The names should match the data source exposed field names. I also recommend looking at the documentation for your TRIRIGA instance at: /p/web/doc.

[Admin: The same question is also posted in the main UX Framework forum. To see other related posts, use the UX Framework tag or Perceptive tag.]

Continue reading

How do you restrict special characters in a text field?


I want to be able to restrict the user from entering special characters like !@#$% in a text field in a form. I could not find any such utility in the Form Builder or Data Modeler. If my understanding is correct, I should be using a workflow for this. But I am not sure how to do it. Any suggestions?

Do you want the field to disallow spaces and numeric characters, as well as special characters like !@#$%? If yes, then Validation > “Alpha Only no Spaces” through Data Modeler may help you…

If you opt to go the workflow route, you could have a switch that uses a few Contains() statements to check for the individual characters you don’t want, but I don’t know how well that function will work with special characters. You may want to look at using the isStringPatternMatch() function, as described in this thread.

[Admin: To see other related posts, use the Character tag.]

Continue reading

How do you configure rights for admin to create new workflows?


Is there a way to configure the rights for an admin account to create new workflows in Workflow Builder?

The user must have the LICENSE_IBM_TRIRIGA_Application_Builder license. This license is required to create a new workflow or BO. The core licenses can modify workflows and BOs, but not create new ones.

[Admin: To see other related posts, use the License tag or Workflow tag.]

Continue reading

How do you use fields that refer to Current Date or System Date?


What is the best way to handle calculated fields that need to reference the Current Date or System Date? For example, I have a number field in the Building BO called Building Age. To calculate the Building Age, I had to create another field called “cstCurrentDateDA” to store the current date the Building record was created.

From there, I take the Current Date minus the In Service Date of the building. However, let’s say I wanted the Building Age field to get updated daily. In my current design, I would have to probably create an asynchronous workflow to update the “cstCurrentDateDA” field and then trigger a Save action to get the extended formula against the Building Age field to fire.

Is there a better approach to dealing with field variables that rely on the Current Date or System Date? Instead of creating a custom field to store the Current Date to act as a constant factor?

[Admin: To see other related posts, use the Date tag.]

Continue reading

How do you use Dynamic Workflow settings in Call Workflow task?


I am looking for some explanations for the “Dynamic Workflow” property settings in the Call Workflow task. When should I use it?

The Dynamic Workflow property and fields allows you to pull the workflow name to execute from a task > field, instead of the workflow name being hard-coded in the workflow. The field must contain the workflow name to execute.

Excerpt from the “Application Building” (3.5.3, PDF) user guide:

Dynamic Workflow: The values of this field are used to dynamically define the name of the workflow that this task will launch. For the “Task with Workflow Name” drop-down list, select the task record that contains the workflow name. For the “Workflow Name Field”, select the field on the task record that contains the workflow name. This record field must contain the workflow name that you want to launch.

[Admin: To see other related posts, use the Workflow tag or Workflow Builder tag.]

Continue reading

Is there a way to clear server caches without Admin Console?


Is there a way to clear server caches without logging into the Admin Console?

Beginning in IBM TRIRIGA Platform 3.5.1, TRIRIGA delivered an enhancement for this to be done via workflow. The pertinent release notes can be found from this wiki page. Here is an excerpt from the release notes on the topic:

A custom task class has been added for workflow which triggers a global cache clear across all servers. 

You can create a custom task and specify the following in the class field: com.tririga.platform.admin.cache.web.CacheProcessingCustomTask $RefreshAllCache

The custom task will perform a global cache clear on the server where the workflow runs as if it were triggered from that server’s Administrator Console. (Tri-211723)

[Admin: To see other related posts, use the Admin Console tag or Cache tag.]

Continue reading