overview

shared memory segment will contain the structures accessible to all the nodes and workflow.

the values are stored in the map.

structure is <boost::interprocess::basic_string,int> with Key being node_id and Value being execution status.

shared memory allocators for string and for map should be created.

shared memory segment  and a semaphore is created by the cbaWorkflow object

cbaWorkflow object passes information about the segment and semaphore to cbaNode object on creation

shared memory object can be accessed by other applications for monitoring and emergency handling, e. g. cbaWFMonitor, shmview,shmupdate

Workflow applications work with shared memory is encapsulated in cbaWFSharedMemory class


status values

execution_status map will be storing the nodeId of the node("1324") and its status -1 for failed, 0-5 for different stages of execution.

valuemeaning
-1failed
0not started
polling the parents and waiting for dependency resolution
2executing
3skipped
4completed


class cbaWFSharedMemory description

class cbaWFSharedMemory
{
public:
cbaWFSharedMemory(string & segmentName){m_shmName=segmentName;}
~cbaWFSharedMemory();
void createSegment();
void createNodesExecutionStatusMap(string &mapName,map<string,int>& executionMap);

void getNodesExecutionStatusMap(map<string,int>& executionMap);
void updateNodeExecutionStatus( string& nodeId,int status);
int getNodeExecutionStatus( string& nodeId);

private:
string m_shmName;
string m_mapName;
}