Package org.apache.airavata.persistance.registry.jpa.resources

Examples of org.apache.airavata.persistance.registry.jpa.resources.NodeDataResource.save()


                throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowExecutionId(), node.getNodeId());
            }
            WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowExecutionId());
            NodeDataResource nodeData = wi.getNodeData(node.getNodeId());
            nodeData.setInputs(data);
            nodeData.save();
        }
  }


  @Override
View Full Code Here


                    throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowExecutionId(), node.getNodeId());
                }
                WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowExecutionId());
                NodeDataResource nodeData = wi.getNodeData(node.getNodeId());
                nodeData.setOutputs(data);
                nodeData.save();
            } catch (RegistryException e) {
                e.printStackTrace();
                throw e;
            }
        }
View Full Code Here

            Timestamp t = new Timestamp(workflowStatusNode.getStatusUpdateTime().getTime());
            if (workflowStatusNode.getExecutionStatus()==State.STARTED){
                nodeData.setStartTime(t);
            }
            nodeData.setLastUpdateTime(t);
            nodeData.save();
            //Each time node status is updated the the time of update for the workflow status is going to be the same
            WorkflowExecutionStatus currentWorkflowInstanceStatus = getWorkflowInstanceStatus(workflowInstance.getWorkflowExecutionId());
            updateWorkflowInstanceStatus(new WorkflowExecutionStatus(workflowInstance, currentWorkflowInstanceStatus.getExecutionStatus(), t));
        }
  }
View Full Code Here

                if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowExecutionId(),node.getNodeId(), true)){
                    throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowExecutionId(),node.getNodeId());
                }
                NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowExecutionId()).getNodeData(node.getNodeId());
                nodeData.setNodeType(type.getNodeType().toString());
                nodeData.save();
            } catch (RegistryException e) {
                e.printStackTrace();
                throw e;
            }
        }
View Full Code Here

        }else {
            if (isWorkflowInstanceNodePresent(workflowInstanceId, nodeId)){
                throw new WorkflowInstanceNodeAlreadyExistsException(workflowInstanceId, nodeId);
            }
            NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(workflowInstanceId).createNodeData(nodeId);
            nodeData.save();
        }

  }

    @Override
View Full Code Here

                if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowExecutionId(),node.getNodeId(), true)){
                    throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowExecutionId(),node.getNodeId());
                }
                NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowExecutionId()).getNodeData(node.getNodeId());
                nodeData.setNodeType(type.getNodeType().toString());
                nodeData.save();
            } catch (RegistryException e) {
                e.printStackTrace();
                throw e;
            }
        }
View Full Code Here

        }else {
            if (isWorkflowInstanceNodePresent(workflowInstanceId, nodeId)){
                throw new WorkflowInstanceNodeAlreadyExistsException(workflowInstanceId, nodeId);
            }
            NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(workflowInstanceId).createNodeData(nodeId);
            nodeData.save();
        }

  }

    @Override
View Full Code Here

                throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowExecutionId(), node.getNodeId());
            }
            WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowExecutionId());
            NodeDataResource nodeData = wi.getNodeData(node.getNodeId());
            nodeData.setInputs(data);
            nodeData.save();
        }
  }


  @Override
View Full Code Here

                    throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowExecutionId(), node.getNodeId());
                }
                WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowExecutionId());
                NodeDataResource nodeData = wi.getNodeData(node.getNodeId());
                nodeData.setOutputs(data);
                nodeData.save();
            } catch (RegistryException e) {
                e.printStackTrace();
                throw e;
            }
        }
View Full Code Here

            Timestamp t = new Timestamp(workflowStatusNode.getStatusUpdateTime().getTime());
            if (workflowStatusNode.getExecutionStatus()==State.STARTED){
                nodeData.setStartTime(t);
            }
            nodeData.setLastUpdateTime(t);
            nodeData.save();
            //Each time node status is updated the the time of update for the workflow status is going to be the same
            WorkflowExecutionStatus currentWorkflowInstanceStatus = getWorkflowInstanceStatus(workflowInstance.getWorkflowExecutionId());
            updateWorkflowInstanceStatus(new WorkflowExecutionStatus(workflowInstance, currentWorkflowInstanceStatus.getExecutionStatus(), t));
        }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.