Skip to content
This repository was archived by the owner on May 25, 2020. It is now read-only.

Spreadsheet Workflow

Constantin Jucovschi edited this page Oct 18, 2013 · 2 revisions

Spreadsheet Workflow

Every spreadsheet document has it’s own instance of the Spreadsheet workflow identified by process id. Hence if user has two document a.xls and b.xls opened, two independent instances of spreadsheet workflow will be running (e.g. one with pid=1 and another with pid=2). An event that was produced by a.xls will be only forwarded to workflow instance pid=1 and an event produced by b.xls will be only forwarded to workflow instance pid=2.

The spreadsheet workflows is a simple event-processing loop where AlexClick messages (i.e. user clicked/selected a new range) are saved into clickEvt variable and forwarded (Spreadsheet Click Forward) to any service (e.g. definition lookup) that might be interested in it.

SallyFrame message (i.e. user requested sally frames), takes last click from clickEvt and forwards it to the DA (DynamicApplicability) which is a task that finds what services are interested in AlexClick objects and gives back a SallyMenuItem (i.e. what items should be put in the framing dialog). The list of choices is saved in MenuItems and passed to “Let User Choose” which requests Theo to display the MenuItems from DA and choose one of them - saved in UserChoice. Last, “Run Choice” executes user’s choice. A typical RunChoice would run a new workflow like Definition Lookup.

“Switch App” and “Navigate To” are two special types of events. These are global events that can be thrown by any workflow and caught by any workflow. The AlexClick type of events are bound to a process ID. When sending an AlexClick message you need to specify to which process ID you want to send it. The Switch App event means that the focus should be switched to the Alex that opened the file “fileName”. If fileName matches the file name of the spreadsheet the current workflow is responsible for, the “Switch App” task sends a SwitchToApp protobuffer message to the respective Alex. “Navigate To” works in a similar way.

Clone this wiki locally