Trouble-free! How to Perform an Options-XML Update?

Utilize Automated Step for updating "Choice Master"

Hi there!

When updating Options-XML, several similar problems have occurred. I would like to describe them along with a solution to each of them.

Before discussing the problems, let’s review the mechanisms of “Options-XML”.

Register an Options-XML file to which the Process Model Definitions Refer to
It is required to select a data type from the Data items definition as “Candidate list”. If the target List was registered into the system by a User with [System Administrator Authorization], reference settings will be allowed from each Process Model. More efficiency of modeling, or a centralized management of the candidate list will be achieved.
3. Provide an Environment where an Option-XML File can be Referred from Multiple Business Process Definitions

1. Register XML file
Upload New files from Shared File menu
2. Update the XML file
Upload files from Shared File menu, with the same file name

<Options-XML Updating Procedure>

Options-XML will be updated in reverse.

== Trouble Case ==

As long as the master data administrator manages the updates alone, there will be no problem.
When multiple managemers update the master data asynchronously, problems will occur.

<Options-XML Updating Trouble Case>

* “Master administrator B” did not know “Master administrator A” was updating the master.
* “Master managemer B” downloaded the Options-XML for update before A’s updates finishes.

When these two events overlap, “Master managemer A’s” updates will be lost.

== Solution ==

This can be caused by the following two factors.

* The Specification of Questetra BPM Suite Options-XML Updating
Options-XML is updated by the reverse method
* Options-XML Updating Procedure
Asynchronous manual updates by multiple administrators

Unfortunately, you cannot change “The Specifications of Questetra BPM Suite Options-XML Updating”.
Then, improve “Options-XML Updating Procedure” and make it more convenient!

* Making it more convenient
Without downloading/uploading shared files, perform automatic updates by inputting updates.
* Improve
Avoid the influence of the reverse method as much as possible even if multiple administrators do updates asynchronously.

<Options-XML Update Process Model>

By using this process model, you no longer need to explicitly download an options-XML file.
You just need to input the type and the contents of the updates.

Since you no longer need to download the target XML file and edit it,
the issue “The updates will be lost by asynchronous updating by multiple administrators” can be solved“almost entirely”.

== Reason why it is “solved almost entirely (but not completely)” ==
In theory, the same issue as with manual update procedures can come up.
(Script Task)Trouble can occur when the “data updating process” is performed simultaneously by multiple administrators.
However, since it takes just a few seconds for processing a Script Task, it can be said that there is only a small possibility (it rarely occurs) of the simultaneous processing.

<Script Task “Data Updating Process” of Process Model>

var fileName = "m726-test";  // Filename of Options-XML to be updated
// Load inputted "Updated Info"
var targetItemsText = new String(data.get("q_targetItems"));
var targetItems = targetItemsText.split("\n");
var items = itemDao.findAll(fileName, true); // Load Options-XML to be updated
var values = "";
var displays = "";
var targetItem = new Array();
var match = false;

// Deletion/Processing for Update: Search target value from Options-XML and process it
for (var i=0; i < items.size(); i++){
	for (var j=0; j < targetItems.length; j++){
		targetItem = (new String(targetItems[j])).split(",");
		if (items.get(i).getValue() == targetItem[1]){
			if (targetItem[0] == "D"){  // Specify Deletion
				match = true;
			if (targetItem[0] == "U"){  // Specify Update
				values += items.get(i).getValue() + "\n";
				displays += targetItem[2] + "\n";
				match = true;
	if (match){
		match = false;
		values += items.get(i).getValue() + "\n";
		displays += items.get(i).getDisplay() + "\n";
// Processing for addition
for (var i=0; i < targetItems.length; i++){
	targetItem = (new String(targetItems[i])).split(",");
	if (targetItem[0] == "I"){
		values += targetItem[1]  + "\n";
		displays += targetItem[2]  + "\n";
values = values.slice(0, -1);
displays = displays.slice(0, -1);


== Afterword ==

Based on the actual trouble case, I have proposed a example of improvement.
Now it seems the updating operation is performed well.

However, there is room for further improvements.

For example,

<Improved Options-XML Updating Process Model>

As shown above, improvements such as

* Placing a mechanism to receive changes from outside so that you can reflect the acquired changes in the business/issue
* Placing steps to check the validity of the changes and performing corrections

etc. Can also be considered.

By sharing master data in Questetra BPM Suite, a consolidated data management and the enhancement of modeling efficiency can be expected.

I hope you will once consider its use or improvement.
Please feel free to contact us should you have any concerns.

♦Workflow Sample


About Masato Furukubo

Questetra, Inc. Sales Department
View all posts by Masato Furukubo

Prev article - 50. Questetra Tips System Collaboration Examples (Ver. June, 2016)
Next article - 50. Questetra Tips Bulk Deletion of Multiple Issues
Another article - Masato Furukubo How to Substitute Approval Step with “Email Reply”