Script is running successfully not sure whiat causing this exception
2019-12-06 06:20:23,627 ERROR [workflow.AbstractScriptWorkflowFunction]: *************************************************************************************
2019-12-06 06:20:23,628 ERROR [workflow.AbstractScriptWorkflowFunction]: Script function failed on issue: null, actionId: 1, file: null
com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:NodeAssociation][sinkNodeId,11731][associationType,IssueComponent][sourceNodeId,null][sourceNodeEntity,Issue][sinkNodeEntity,Component] (SQL Exception while executing the following:INSERT INTO public.nodeassociation (SOURCE_NODE_ID, SOURCE_NODE_ENTITY, SINK_NODE_ID, SINK_NODE_ENTITY, ASSOCIATION_TYPE, SEQUENCE) VALUES (?, ?, ?, ?, ?, ?) (ERROR: null value in column "source_node_id" violates not-null constraint
Detail: Failing row contains (null, Issue, 11731, Component, IssueComponent, null).))
at com.atlassian.jira.association.NodeAssociationStoreImpl.createAssociation(NodeAssociationStoreImpl.java:93)
at com.atlassian.jira.association.NodeAssociationStoreImpl.createAssociation(NodeAssociationStoreImpl.java:74)
at com.atlassian.jira.bc.project.component.DefaultProjectComponentManager.updateIssueValue(DefaultProjectComponentManager.java:233)
at com.atlassian.jira.bc.project.component.DefaultProjectComponentManager.updateIssueProjectComponents(DefaultProjectComponentManager.java:217)
at com.atlassian.jira.issue.fields.ComponentsSystemField.updateIssueValue(ComponentsSystemField.java:438)
at com.atlassian.jira.issue.fields.ComponentsSystemField.updateValue(ComponentsSystemField.java:411)
at com.atlassian.jira.issue.managers.DefaultIssueManager.updateFieldValues(DefaultIssueManager.java:708)
at com.atlassian.jira.issue.managers.DefaultIssueManager.updateIssue(DefaultIssueManager.java:673)
at com.atlassian.jira.issue.managers.RequestCachingIssueManager.updateIssue(RequestCachingIssueManager.java:219)
at com.atlassian.jira.issue.IssueManager$updateIssue$0.call(Unknown Source)
at Script1241.run(Script1241.groovy:35)
Caused by: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:NodeAssociation][sinkNodeId,11731][associationType,IssueComponent][sourceNodeId,null][sourceNodeEntity,Issue][sinkNodeEntity,Component] (SQL Exception while executing the following:INSERT INTO public.nodeassociation (SOURCE_NODE_ID, SOURCE_NODE_ENTITY, SINK_NODE_ID, SINK_NODE_ENTITY, ASSOCIATION_TYPE, SEQUENCE) VALUES (?, ?, ?, ?, ?, ?) (ERROR: null value in column "source_node_id" violates not-null constraint
Detail: Failing row contains (null, Issue, 11731, Component, IssueComponent, null).))
at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:206)
at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:171)
at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:89)
at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:562)
at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:548)
at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:114)
at com.atlassian.jira.association.NodeAssociationStoreImpl.createAssociation(NodeAssociationStoreImpl.java:91)
... 10 more
Caused by: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:INSERT INTO public.nodeassociation (SOURCE_NODE_ID, SOURCE_NODE_ENTITY, SINK_NODE_ID, SINK_NODE_ENTITY, ASSOCIATION_TYPE, SEQUENCE) VALUES (?, ?, ?, ?, ?, ?) (ERROR: null value in column "source_node_id" violates not-null constraint
Detail: Failing row contains (null, Issue, 11731, Component, IssueComponent, null).)
at org.ofbiz.core.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:570)
at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:198)
... 16 more
Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "source_node_id" violates not-null constraint
Detail: Failing row contains (null, Issue, 11731, Component, IssueComponent, null).
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:288)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:430)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:356)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:168)
at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:135)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98)
at org.ofbiz.core.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:562)
... 17 more