/**
     * @return void
     * @param CoreWorkflowDatPacket $coreWorkflowDataPacket
     * @desc Displays the HTML for the each workflow item
    */
    function html_displayXML($coreWorkflowDataPacket)
    {
        $tdClass = 'helpBod';
        $planGroups = array();
        $formName = '';
        workflowDisplayHTML::workflowState($coreWorkflowDataPacket->getWorkflowId(), $coreWorkflowDataPacket->getData(), false);
        //Fetch plans from the database
        $planGraphList = graphPlanDatabaseAccess::getPlanGraphList($coreWorkflowDataPacket->getworkflowid());
        $possibleActions = actionPacket::processLoop($planGraphList, $coreWorkflowDataPacket->getworkflowid());
        if (sizeof($possibleActions)) {
            //Actions have been fouund
            $possibleActionsSize = sizeof($possibleActions);
            for ($actionPacketIndex = 0; $actionPacketIndex < $possibleActionsSize; $actionPacketIndex++) {
                $currentAction = $possibleActions[$actionPacketIndex]->getAction();
                $data = $currentAction->getData();
                $entryTimepoint = $currentAction->getName();
                $vars = $data[0]->getPredicateValues();
                $formName = $vars[0]->toString();
                $workflowCreator = $vars[1]->toString();
                //Convert into string form
                array_push($planGroups, $vars[2]->toString());
                //Check if this is a loop re-entry point
                if ($possibleActions[$actionPacketIndex]->checkForLoopReentry($entryTimepoint)) {
                    //Check we have not already save the state
                    if (!graphPlanDatabaseAccess::stateAlreadyUpdated($coreWorkflowDataPacket->getworkflowid(), $formName)) {
                        graphPlanDatabaseAccess::savePlanState($planGraphList, $coreWorkflowDataPacket->getworkflowid(), $formName);
                    }
                }
            }
            //Fetch the groups the user is a member of
            $groups = groups::getUserGroupNames($_SESSION['valid_user']);
            $groupString = "";
            $superuser = false;
            //Compare against the groups specified in the plans
            $groupsSize = sizeof($groups);
            for ($index = 0; $index < $groupsSize; $index++) {
                if ($groups[$index] == 'superuser') {
                    $superuser = true;
                } else {
                    $groupString .= $groups[$index];
                }
            }
            if (!$superuser) {
                $match = arrays::searchArray($planGroups, $groups);
            } else {
                $match = $planGroups[0];
            }
            ?>
		
	<td class="<?php 
            echo $tdClass;
            ?>
" width="172"><?php 
            echo string::sentence($formName);
            ?>
</td>
        
	<td class="<?php 
            echo $tdClass;
            ?>
" width="100"> <?php 
            echo string::sentence($workflowCreator);
            ?>
 </td>
        
	<td class="<?php 
            echo $tdClass;
            ?>
"> <?php 
            echo time::arrangedate($coreWorkflowDataPacket->getDate());
            ?>
 </td>

	<?php 
            workflowDisplayHTML::buttons($coreWorkflowDataPacket->getWorkflowId(), $match, $planGroups, $formName);
        }
    }