You are not logged in.
Announcement
Unanswered posts
|
Hi Wkyy/Shong, could you share the solution on this topic?
I am stucked on the "How can I use the conn name from the parent job?"
thanks
oh.. found the answer in the User Guide. So i still need the connection component in the child
shong wrote:
Hello
1> after receiving every message on the queue, I want to parse xml & want to update 2 tables. ( with different data)
2> I want to commit only if both the inserts are successful, otherwise I want to rollback.I know you request now, put these transcation:parse xml & want to update 2 tables in a child job.
In father job, share the database conection,
tMysqlConnection (select 'shared DB connecton option and type in a conn name, so the child job can use this connection)
|
tRunJob(run the child job)-->oncomponentok-->tMysqlCommit
|
oncomponenterror
|
tMysqlRollback
Best regards
shong
I have selected the 'shared DB connection option' and type in a conn name with double quotes in the parent job, but how can I use it in my child job?
In the child job, if I select 'Use an existing connection', Component List is shown, which allows me to select a connection in the child job, but I'm suppose to use the connection from the Parent job. How can I use the conn name from the parent job?
Thanks!
Hi,
How can I re-arrange this flow to use Extend insert feature i.e. to use bulk insert ( committing after 1000 rows)
thanks,
Hrishi
It's now working as expected. Thanks for your help.
Hello
I want to commit every message as it comes on the tMominput.
Using a tFlowToIterate to iterate each message and send it to child job. Please see my screenshot.
Best regards
shong
Hi,
I've created the parent & child as shown in the attached diag. Still the problem is tMominput is a infinite loop so control never comes back to the parent job to commit the data.
I want to commit every message as it comes on the tMominput.
Hello
Put it in child job.
Best regards
shong
so where should I put my mominput component ( in parent job or child job)? Can you please explain me in detail as I'm still not able to execute it.
Hello
1> after receiving every message on the queue, I want to parse xml & want to update 2 tables. ( with different data)
2> I want to commit only if both the inserts are successful, otherwise I want to rollback.
I know you request now, put these transcation:parse xml & want to update 2 tables in a child job.
In father job, share the database conection,
tMysqlConnection (select 'shared DB connecton option and type in a conn name, so the child job can use this connection)
|
tRunJob(run the child job)-->oncomponentok-->tMysqlCommit
|
oncomponenterror
|
tMysqlRollback
Best regards
shong
I tried that, but my requirement is
1> after receiving every message on the queue, I want to parse xml & want to update 2 tables. ( with different data)
2> I want to commit only if both the inserts are successful, otherwise I want to rollback.
If I use commit on 'component ok', then it puts it outside the activeMQ's while loop. That means it won't get committed immediately.
Hello
1)The component: txxxcommit and txxxrollback should be linked with 'oncomponentok'
2)For debug, you can add some tLogRow components in your job to print datas on console for the first time.
Best regards
shong
This is what I've done. but its not executing in 1 transaction.
Hello
After you extract the xml message from activeMQ, then link it to a tExtractXMLField component to parse this xml message and extract the useful data, eg:
tMysqlConnection_1(db1)
|
onSubjobok
|
tMysqlConnection_2(db2)
|
onsubjobok
|
tMomInput--tExtractXMLField-->tFileOutputDelimited(tempopary output file)
|
onsubjobok
|
tFileInputDelimited(read data from tempopary file)-->tMysqlOutput(db1)--OnComponentOk--tMysqlCommit(connection1)
--OnComponentError--tMysqlRollback(connection1)
|
onsubjobok
|
tFileInputDelimited(read data from tempopary file)-->tMysqlOutput(db2)--OnComponentOk--tMysqlCommit(connection2)
--OnComponentError--tMysqlRollback(connection2)
Best regards
shong
Hi,
I'm trying to consume xml message from activeMQ. I want to apply some transformation on this xml & then I need to update it to 2 different database tables ( ms sql server).
I'm not sure how can I do it in single transaction. If update to any of the table fails, I want to rollback otherwise commit.
I want to commit/rollback for each XML message.