- Posts: 568
- Thank you received: 72
ExecuteObject Failure
- bruce.gibbins
- Topic Author
- Offline
- Platinum Member
-
Less
More
2 years 3 months ago - 2 years 3 months ago #21149
by bruce.gibbins
ExecuteObject Failure was created by bruce.gibbins
AETLE v6.3.7.17 x64
Hi,
I have setup a package that monitors for a trigger file. When the file appears it is read and parsed by the package to return a PackageID. This packageID is then used by a script to call ExecuteObject().
If I run this all from the designer it works well. the package is executed,. However, when the package is triggered on the Server the package runs as expected BUT, the script that evoked ExecuteObject() indicates an error occurred. There is no clue as to what that error is and as I say the child Package is executed successfully.
I have attached a screenshot of the Package and the text from the script.
Let me know if I can provide any further detail. I am hoping you can tell me if I have done something wrong.
Cheers
Hi,
I have setup a package that monitors for a trigger file. When the file appears it is read and parsed by the package to return a PackageID. This packageID is then used by a script to call ExecuteObject().
If I run this all from the designer it works well. the package is executed,. However, when the package is triggered on the Server the package runs as expected BUT, the script that evoked ExecuteObject() indicates an error occurred. There is no clue as to what that error is and as I say the child Package is executed successfully.
I have attached a screenshot of the Package and the text from the script.
Let me know if I can provide any further detail. I am hoping you can tell me if I have done something wrong.
Cheers
Code:
begin
// Returns 0 on success and 1 on error
// Therefore, if compare result with 0 will return True or False
result := ExecuteObject(GetVariable('<TRIGGER_PackageID>')) = 0 ;
end;
Last edit: 2 years 3 months ago by bruce.gibbins.
Please Log in or Create an account to join the conversation.
2 years 3 months ago #21155
by admin
The following user(s) said Thank You: bruce.gibbins
Please Log in or Create an account to join the conversation.
- Peter.Jonson
-
- Offline
- Platinum Member
-
2 years 3 months ago - 2 years 3 months ago #21159
by Peter.Jonson
Peter Jonson
ETL Developer
Replied by Peter.Jonson on topic ExecuteObject Failure
Hi Bruce.
The issue you reported was corrected in the latest release
The issue you reported was corrected in the latest release
Peter Jonson
ETL Developer
Last edit: 2 years 3 months ago by Peter.Jonson.
The following user(s) said Thank You: bruce.gibbins
Please Log in or Create an account to join the conversation.
- bruce.gibbins
- Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 568
- Thank you received: 72
2 years 3 months ago #21160
by bruce.gibbins
Replied by bruce.gibbins on topic ExecuteObject Failure
Hi. Confirming this works well.
If I may query.... as I am away from a terminal at the moment and cannot test for myself...this is a multi-part question all related to this topic...
QUESTION 1
When the child object is executed, does the child have any visibility of the calling package? For example parentb package variables?
If possible I'd like to have the child 'know that it was executed via executeobject() in a parent package. I know this may not be relevant for an SQL SCRIPT child but it may be handy for a child package or transformation to know that it being evoked through this process.
In our case we would use it to clean up and move things around for the child process. We are using this approach to allow non AETL users to trigger a reexecution of a package that failed to run after they have corrected some data . They use a Web portal form that I have created that creates a trigger file for the parent package to then run the child package they nominate.
QUESTION 2
In our scenario I noticed that the execution log for the child package is amalgamated with the execution log of the parent. So when looking at the execution log we can see the trigger parent package and its status but we have to drill into that log to see what child package was triggered and what its status was. I was wondering if a future feature request could be considered where we could nominate in the executeobject() function call an optional flag that allows the child object execution log to exist in its own entry?
The benefit being that in our case we could see that the trigger package ran and that the child package also ran and all of its steps but as 2 separate execution log entries.
Kind regards
Bruce
If I may query.... as I am away from a terminal at the moment and cannot test for myself...this is a multi-part question all related to this topic...
QUESTION 1
When the child object is executed, does the child have any visibility of the calling package? For example parentb package variables?
If possible I'd like to have the child 'know that it was executed via executeobject() in a parent package. I know this may not be relevant for an SQL SCRIPT child but it may be handy for a child package or transformation to know that it being evoked through this process.
In our case we would use it to clean up and move things around for the child process. We are using this approach to allow non AETL users to trigger a reexecution of a package that failed to run after they have corrected some data . They use a Web portal form that I have created that creates a trigger file for the parent package to then run the child package they nominate.
QUESTION 2
In our scenario I noticed that the execution log for the child package is amalgamated with the execution log of the parent. So when looking at the execution log we can see the trigger parent package and its status but we have to drill into that log to see what child package was triggered and what its status was. I was wondering if a future feature request could be considered where we could nominate in the executeobject() function call an optional flag that allows the child object execution log to exist in its own entry?
The benefit being that in our case we could see that the trigger package ran and that the child package also ran and all of its steps but as 2 separate execution log entries.
Kind regards
Bruce
Please Log in or Create an account to join the conversation.
2 years 3 months ago #21187
by admin
Mike
ETL Architect
Replied by admin on topic ExecuteObject Failure
Re QUESTION 1
Yes, they can see each other variables.
Yes, they can see each other variables.
Mike
ETL Architect
Please Log in or Create an account to join the conversation.
- bruce.gibbins
- Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 568
- Thank you received: 72
2 years 2 months ago - 2 years 2 months ago #21227
by bruce.gibbins
Replied by bruce.gibbins on topic ExecuteObject Failure
Hi
We have this solution basically working.
The problem I have is that for some reason we are getting a List Index Out of Bounds message but the Log shows that the child process completes successfully. I suspect it is as the ExecuteObject returns into the calling script but there is nothing in the log that tells me what or why.
I have attached the log snippet.
The blue highlights the end of the Child process ending with an email
The Yellow shows the error
The Green is the RunNow Package responding to the negative response from ExecuteObject
I have also included the Script Code
Any Ideas?
We have this solution basically working.
- We trigger a file being created via a web app
- The Directory Monitor sees the file and Runs a special package called RunNow
- RunNow reads the trigger file and pulls in the Dhild Package to Execute and calls ExecuteIObject
- RunNow Checks the return value of ExecuteObject and if Ok sends out a positive email. If it fails then a negative email
The problem I have is that for some reason we are getting a List Index Out of Bounds message but the Log shows that the child process completes successfully. I suspect it is as the ExecuteObject returns into the calling script but there is nothing in the log that tells me what or why.
I have attached the log snippet.
The blue highlights the end of the Child process ending with an email
The Yellow shows the error
The Green is the RunNow Package responding to the negative response from ExecuteObject
I have also included the Script Code
Code:
begin
// Returns 0 on success and 1 on error
// Therefore, if compare reasult with 0 will return True or False
result := ExecuteObject(GetVariable('<TRIGGER_PackageID>')) = 0 ;
end;
Any Ideas?
Last edit: 2 years 2 months ago by bruce.gibbins.
Please Log in or Create an account to join the conversation.