Skip to main content

The New Action Mechanism

With the release of xProcess v3.5 we have implemented a new way of collecting data through Actions: (the Recursive Solution). Existing actions can still be used but those that have a tendency to generate large amounts of data may need to be rewritten in order to get the benefit of the new mechanism.

The following example reworks the Work Log for Person action.
In which ever Process you want to, create a new Action called 'Get DailyRecords for Person'. This will return a set of daily records in a date range and is the FetchSet Action.
The first difference we see in v3.5 is that there is a new Editor for Actions. The Editor is split into three tabs:
  • Editor tab – a text area for the OGNL Expression

  • Details Tab:

  • Action Name - the name of the action
  • Applicable to - What it is applicable to (any element is the default)
  • UI Action - should it appear on context menu for element its applicable to?
  • On this tab are a further two tabs; Parameters: add the Parameters that will be presented to the user when the Action is run. These parameter values are sent into the OGNL expression when run. We will come onto the Export tab later.
  • Test Action Tab:

  • On the Test Action Tab you can choose an Element to run the Action on to test it and enter the parameters for that action. It is recommended that you create test Elements for this, as the Action may change that Elements data.
  • The lower part of this tab shows the output when the test it run

For the 'Get DailyRecords for Person' we just need the OGNL for retrieving the daily records, so in the Actions Editor we enter in:
#project = projects.isEmpty() ? null : projects.iterator().next(),#from
= (#project != null) ? #project.getDayProperty("fromDateForReport") :
null,#to = (#project != null) ?
#project.getDayProperty("toDateForReport") : null,
#dailyrecords = getWorkLog(#from,#to,null)
Hit Ctrl+S to save the Action.
The next Action to create is the 'Generate Work Log Details'. This Action is the Subordinate Action. You can have one or more Subordinate Actions, and these Actions are run against the data set that the FetchSet Action returns. The OGNL to enter in this Actions Editor is:
#output = '"' +
day + '","' +
assignment.task.project.label + '","' +
assignment.task.label + '","' +
assignment.requiredResource.roleType.label + '","' +
time/60.0 + '","' +
logEntry + '","' +
confirmed + '"',
#output = #output + '\n',
Hit Ctrl+S to save the Action.
The final Action is the 'New Work Log for Person'. It's OGNL gets called before the FetchSet and Subordinate Actions, so we use that to provide the column header that will be written to file:
#project = projects.isEmpty() ? null : projects.iterator().next(),#from
= (#project != null) ? #project.getDayProperty("fromDateForReport") :
null,#to = (#project != null) ?
#project.getDayProperty("toDateForReport") : null,
#output = 'Work Log for: ' + label + '\n'
+ 'From: ' + ((#from==null) ? 'earliest booked time in data source'
: #andfrom) + ' To: ' + ((#to==null) ? #$today : #to) +'\n'
+ 'Date,Project,Task,Role,Hours,Log Entry,Confirmed\n',
Then go to the Details tab and:
  • Make the Action applicable to Person
  • Click on the Export tab and tick the Export Action checkbox. Give it a .csv extension
  • On the FetchSet Field click on the '…' and select the ' Get DailyRecords for Person' Action
  • Now click on the Add button in the Subordinate section, and select the ' Generate Work Log Details' Action
  • Hit Ctrl+S to save the Action
We can now test the Action via File | Export | xProcess Export | Custom Reports. When the Action runs it uses the FetchSet Action to retrieve a set of Daily Records on Projects for the selected Person. This Daily Record set is then iterated over passing in the Daily Records to the Subordinate Action.
Since each time a Daily Record is iterated over a line is written out to file, it prevents the building up of large data to be written out to file, and possible memory issues.
Post a Comment

Popular posts from this blog

Does your Definition of Done allow known defects?

Is it just me or do you also find it odd that some teams have clauses like this in their definition of done (DoD)?
... the Story will contain defects of level 3 severity or less only ... Of course they don't mean you have to put minor bugs in your code - that really would be mad - but it does mean you can sign the Story off as "Done"if the bugs you discover in it are only minor (like spelling mistakes, graphical misalignment, faults with easy workarounds, etc.). I saw DoDs like this some time ago and was seriously puzzled by the madness of it. I was reminded of it again at a meet-up discussion recently - it's clearly a practice that's not uncommon.

Let's look at the consequences of this policy. 

Potentially for every User Story that is signed off as "Done" there could be several additional Defect Stories (of low priority) that will be created. It's possible that finishing a Story (with no additional user requirements) will result in an increase in…

"Plan of Intent" and "Plan of Record"

Ron Lichty is well known in the Software Engineering community on the West Coast as a practitioner, as a seasoned project manager of many successful ventures and in a number of SIGs and conferences in which he is active. In spite of knowing Ron by correspondence over a long period of time it was only at JavaOne this year that we finally got together and I'm very glad we did.

Ron wrote to me after our meeting:

I told a number of people later at JavaOne, and even later that evening at the Software Engineering Management SIG, about xProcess. It really looks good. A question came up: It's a common technique in large organizations to keep a "Plan of Intent" and a "Plan of Record" - to have two project plans, one for the business partners and boss, one you actually execute to. Any support for that in xProcess?

Good question! Here's my reply...

There is support in xProcess for an arbitrary number of target levels through what we call (in the process definitions) P…

Understanding Cost of Delay and its Use in Kanban

Cost of Delay (CoD) is a vital concept to understand in product development. It should be a guide to the ordering of work items, even if - as is often the case - estimating it quantitatively may be difficult or even impossible. Analysing Cost of Delay (even if done qualitatively) is important because it focuses on the business value of work items and how that value changes over time. An understanding of Cost of Delay is essential if you want to maximise the flow of value to your customers.

Don Reinertsen in his book Flow [1] has shown that, if you want to deliver the maximum business value with a given size team, you give the highest priority, not to the most valuable work items in your "pool of ideas," not even to the most urgent items (those whose business value decays at the fastest rate), nor to your smallest items. Rather you should prioritise those items with the highest value of urgency (or CoD) divided by the time taken to implement them. Reinertsen called this appro…