Accommodating Manager Changes in Asset Investigations

Saturday, February 19, 2011
In yesterday's post, "Taking on Management of IFRS Related Workflows," we presented a workflow for investigating fixed asset management. Companies that have many fixed assets may find that the manager listed in the fixed asset ledger (person in charge of investigation) has changed. If you want to take these cases into account, you can divide the investigation task into two tasks (2a. Start Investigation and 2b. Investigation Report), and enable the first person to assign the second task to another person.





This workflow will even cover cases where the manager doesn't do the investigation herself but entrusts the work to a subordinate. (In other words, dividing the "appointing" task and "conducting" task is convenient for distribution of authorization.)

Now, another way to define this workflow is to split the flow into two parallel routes. In other words, splitting the flow depending on whether a defect is found would be beneficial for accurately managing and responding quickly to problems (3a. Confirm Investigation [w/ Defect] and 3b. Confirm Investigation [No Defect]).




Spreadsheet Settings in Questetra BPM Suite SaaS Edition

1. Test the workflow reception (optional)
After activating the workflow to be used, check the URL address found in the [Version Detail] screen.

Example)

https://s.questetra.net/XXXXXXXX/System/Event/MessageStart/start?processModelInfoId=ZZ&nodeNumber=WW&key=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY

In our sample workflow, there are two necessary input fields: title (Name) and data[0] (Manager). So the system should automatically start a new process when it receives an access like:

https://s.questetra.net/XXXXXXXX/System/Event/MessageStart/start?processModelInfoId=ZZ&nodeNumber=WW&key=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY&title=Osaka+Factory&data[0].email=tsujimoto@example.com

As a test, copy & paste this long address into your browser (you should get a blank page), and make sure a new task is created in your task list.


2. Prepare a list of fixed assets in Google Docs
Log into Google Docs and create a new file from [Create new > Spreadsheet]. Give the spreadsheet a title (e.g., Fixed_Assets_Management_List) and create two questions (Question Titles: "Name" and "Manager (Email Address)."

You should get a spreadsheet with "Name" in column A and "Manager (Email Address)" in column B.

3. Get ready to send the list to Questetra BPM Suite
Open the spreadsheet, and create a new script from [Tools > Scripts >Script editor]
Replace...


function myFunction() {
}

...with...


function startWorkflow() {
  var sheet = SpreadsheetApp.getActiveSheet();
  var startRow = 2;
  var numRows = 10; //provisional setting: Max 10 assets
  
  var dataRange = sheet.getRange(startRow, 1, numRows, 2);
  var data = dataRange.getValues();
  for ( var i = 0; i < data.length; ++i) {
    var row = data[i];
  
    var name = row[0];
    var manager = row[1];
      
  var url = "https://s.questetra.net/XXXXXXXX/System/Event/MessageStart/start";
    var payload = 'processModelInfoId=ZZ';
    payload += '&nodeNumber=WW';
    payload += '&key=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY';
    payload += '&title=' + encodeURIComponent(name);
   payload += '&data[0].email=' + encodeURIComponent(manager);
    var params = {
      method: 'post',
      payload: payload
    };
    UrlFetchApp.fetch(url, params);
  }
}

...and save. Make sure you replace "XXXXXXXX", "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY", "ZZ" and "WW" with your own info. If you are not in Japan, you will probably want to also change "JST" to your own timezone.

4. Run the script! 
Click [ (Run sellected script)] button on the Script Editor, and you will find assets' information input from a Google Spreadsheets and see as many first tasks as the number of rows (Max. 10).

* You can select [tool] > [script] > [manager...] and run this script on Script Manager.