...
Next, we need to provide the python implementations for the Steps using the generated templates (as explained in the Find-Primes example ):. Note the implementation of the createAwaitsList
function in both the python Step classes which defines the input dependences on values from the Item Collections.
Code Block | ||||
---|---|---|---|---|
| ||||
class Application: @staticmethod def onStart(args, input, singletonTag): # TODO fill out the body of the function # e.g. operation on output item collections: anItemCollection.put(aTag, aValue) # e.g. operation on tag collections: aTagCollection.putTag(aTag) if len(args) > 0: firstArg = args[0] print("py: processing " + firstArg) input.put(firstArg, firstArg) singletonTag.putTag(firstArg) else: print("py: usage PartitionStringMain <the_string_to_process>") @staticmethod def onEnd(results): # e.g. operation on input item collections: anItemCollection.get(aTag) # e.g. operation on input item collections: anItemCollection.printContents() results.printContents() |
...