[Anthill-pro] Running workflows programatically - part2 [tmon-status: ticketId=5074]

Evora, Hermes HEvora at edmunds.com
Mon Mar 30 10:30:42 CST 2009


Hi Emerson,
I experienced that error in one of my scripts, and it happened because I was trying to set a property to a very long string. I was passing to the property a set of complete pass to files in a folder. By removing the path and set the property to just all the names, that error disappeared. Then, I had to create another property to set my path to the folder.
Bottom-line, just find a way to make your string property shorter, so the AH3 database can handle it.

Hermes Evora

-----Original Message-----
From: anthill-pro-bounces at lists.urbancode.com [mailto:anthill-pro-bounces at lists.urbancode.com] On Behalf Of emerson cargnin
Sent: Monday, March 30, 2009 2:53 AM
To: support at urbancode.com; AnthillPro user and support list.
Subject: Re: [Anthill-pro] Running workflows programatically - part2 [tmon-status: ticketId=5074]

Hi Ryan

Thanks for the answer.
The strange thing is that when I try to run the primary workflow I get
an property related error.
The error is on the only property that hasn't default value. And the
error happens regardless if I set or not the property. The property is
called "tagToReleaseFrom". I tried in different projects and I get the
same result.

2009-03-30 10:32:28,172 ERROR /0.0.0.0:4567-111
com.urbancode.anthill3.services.build.BuildServiceImplMerging - Error
updating object in database: Error storing object in database
com.urbancode.anthill3.domain.persistent.PersistenceException: Error
updating object in database: Error storing object in database
        at com.urbancode.anthill3.domain.buildrequest.BuildRequestDaoSql.update(BuildRequestDaoSql.java:400)
        at com.urbancode.anthill3.persistence.UnitOfWorkDefault.commit0(UnitOfWorkDefault.java:166)
        at com.urbancode.anthill3.persistence.UnitOfWork.commit(UnitOfWork.java:744)
        at com.urbancode.anthill3.services.build.BuildServiceImplMerging.runBuilds(BuildServiceImplMerging.java:236)
        at com.urbancode.anthill3.services.build.BuildServiceImplMerging.runBuild(BuildServiceImplMerging.java:194)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.urbancode.devilfish.services.method.MethodCall.invoke(MethodCall.java:145)
        at com.urbancode.anthill3.persistence.remoting.common.UnitOfWorkMethodCall.invoke(UnitOfWorkMethodCall.java:87)
        at com.urbancode.devilfish.services.method.MethodCallService.callMethod(MethodCallService.java:36)
        at com.urbancode.devilfish.services.method.dvlf.MethodCallServiceHandler.doMethod(MethodCallServiceHandler.java:67)
        at com.urbancode.devilfish.services.method.dvlf.MethodCallServiceHandler.handleConnection(MethodCallServiceHandler.java:53)
        at com.urbancode.devilfish.server.dvlf.DelegatingConnectionHandler.handleConnection2(DelegatingConnectionHandler.java:79)
        at com.urbancode.commons.net.ConnectionHandlerBase2.run(ConnectionHandlerBase2.java:52)
        at com.urbancode.commons.util.ThreadPool$WorkerThread.run(ThreadPool.java:208)
Caused by: com.urbancode.anthill3.domain.persistent.PersistenceException:
Error storing object in database
        at com.urbancode.anthill3.domain.buildrequest.BuildRequestDaoSql.storeBuildRequestPropMap(BuildRequestDaoSql.java:1002)
        at com.urbancode.anthill3.domain.buildrequest.BuildRequestDaoSql.update(BuildRequestDaoSql.java:366)
        ... 16 more
Caused by: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException:
Duplicate entry '622555-tagToReleaseFrom' for key 1
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
        at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1604)
        at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1519)
        at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1504)
        at com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate(P6LogPreparedStatement.java:183)
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
        at com.urbancode.anthill3.domain.buildrequest.BuildRequestDaoSql.storeBuildRequestPropMap(BuildRequestDaoSql.java:976)
        ... 17 more
2009-03-30 10:32:28,175 ERROR BuildServiceThread
com.urbancode.anthill3.domain.buildrequest.BuildRequestDaoSql - Error
updating object in database: null
com.urbancode.anthill3.domain.persistent.ConcurrentModificationException
        at com.urbancode.anthill3.domain.buildrequest.BuildRequestDaoSql.update(BuildRequestDaoSql.java:359)
        at com.urbancode.anthill3.persistence.UnitOfWorkDefault.commit0(UnitOfWorkDefault.java:166)
        at com.urbancode.anthill3.persistence.UnitOfWork.commit(UnitOfWork.java:744)
        at com.urbancode.anthill3.services.build.RequestContext.run(RequestContext.java:150)
        at com.urbancode.anthill3.services.build.BuildServiceImplMerging.run(BuildServiceImplMerging.java:162)
        at java.lang.Thread.run(Thread.java:595)
2009-03-30 10:32:28,176 ERROR BuildServiceThread
com.urbancode.anthill3.services.build.BuildServiceImplMerging - Error
running build requests in context
com.urbancode.anthill3.domain.persistent.PersistenceRuntimeException:
com.urbancode.anthill3.domain.persistent.PersistenceException: Error
updating object in database: null
        at com.urbancode.anthill3.services.build.RequestContext.run(RequestContext.java:153)
        at com.urbancode.anthill3.services.build.BuildServiceImplMerging.run(BuildServiceImplMerging.java:162)
        at java.lang.Thread.run(Thread.java:595)
Caused by: com.urbancode.anthill3.domain.persistent.PersistenceException:
Error updating object in database: null
        at com.urbancode.anthill3.domain.buildrequest.BuildRequestDaoSql.update(BuildRequestDaoSql.java:400)
        at com.urbancode.anthill3.persistence.UnitOfWorkDefault.commit0(UnitOfWorkDefault.java:166)
        at com.urbancode.anthill3.persistence.UnitOfWork.commit(UnitOfWork.java:744)
        at com.urbancode.anthill3.services.build.RequestContext.run(RequestContext.java:150)
        ... 2 more
Caused by: com.urbancode.anthill3.domain.persistent.ConcurrentModificationException
        at com.urbancode.anthill3.domain.buildrequest.BuildRequestDaoSql.update(BuildRequestDaoSql.java:359)
        ... 5 more


2009/3/27 rws at urbancode.com <support-bot at urbancode.com>:
> BuildRequest buildRequest = new BuildRequest(workflow.getBuildProfile(),
> user, RequestSourceEnum.MANUAL, user);
> buildRequest.setForcedFlag(true);
> buildRequest.store();
> UnitOfWork.getCurrent().commit();
> buildService.runBuild(buildRequest);
>
>
>
> Ryan
>
>
> emerson cargnin wrote:
>> Hi
>>
>> I'm having a bit of a trouble trying to find how to start a primary workflow.
>>
>> I tried to use the following:
>>       BuildService buildService = BuildService.getInstance();
>>       BuildRequest request=new BuildRequest(true);
>>       request.setWorkflow(workflow);
>>       buildService.runWorkflow(request);
>>
>> But it doesn't seem to work. I also can't find where to set the
>> workflow properties.
>>
>> To start a secondary workflow I used a workflowcase based on a
>> buildlife, but I can't find how to start a new one.
>>
>> Can anyone just point me the way to do this?
>>
>> emerson
>> _______________________________________________
>> Anthill-pro mailing list
>> Anthill-pro at lists.urbancode.com
>> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>>
>>
>
_______________________________________________
Anthill-pro mailing list
Anthill-pro at lists.urbancode.com
http://lists.urbancode.com/mailman/listinfo/anthill-pro



More information about the Anthill-pro mailing list