[rules-users] Drools Timers

2014-09-23 Thread Demian Calcaprina
Hey Guys, I am trying to use to use the timer in the rule, but I don't
fully understand it.
I have a simple rule which says

rule Test

timer(int: 1s)
when
   Something()
then
   System.out.println(Something Happens);
end

And I insert 100 Someting() object, after 1 second I see 100 activations.
- Can I do with the timer something like run this rule once per minute
for example?
- When does the timer start to run?

Thanks in advance,

Demian
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Question about length windows

2014-05-01 Thread Demian Calcaprina
Hi Guys, I have one question about how lenght windows will work.

I have a rule like this. Basically, it is a crosses function, where the
value of my object crosses a value.

rule mytest
dialect mvel
when
t2_1 : Tick( value  102.352 ) over window:length (1)
t1_1 : Tick( this before t2_1 , value = 102.352 ) over window:length (2)
then
//DO SOMETHING
end

23:51:32,150 INFO  [org.drools.core.audit.WorkingMemoryConsoleLogger]
(Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION FIRED rule:mytest
activationId:berarrr_1 [0, 27, 26] declarations: t2_1=Tick [value=102.351,
tickTime=Fri May 02 05:51:31 ART 2014](27); t1_1=Tick [value=102.352,
tickTime=Fri May 02 05:51:12 ART 2014](26)

23:53:30,560 INFO  [org.drools.core.audit.WorkingMemoryConsoleLogger]
(Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION CREATED rule:mytest
activationId:berarrr_1 [0, 146, 26] declarations: t2_1=Tick [value=102.349,
tickTime=Fri May 02 05:53:30 ART 2014](146); t1_1=Tick [value=102.352,
tickTime=Fri May 02 05:51:12 ART 2014](26)

If you see, the first activation, the
window:length(1), matched the object 27
window:length(2), matched the object 26

Then, after 2 minutes and some Ticks insertes in the WM
window:length(1), matched the object 146
but window:length(2), still matched the object 26

I would expect, that, as object 26 was the first one to be inserted, then
it is outside the window:length(2).

Is my understanding correct? Am I making something wrong? I am using Drools
6.

Thanks!

Demian
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Guvnor JCR repository

2014-02-09 Thread Demian Calcaprina
Hi Guys,

I am using Guvnor 5.5. For moving packages between environments, I am doing
an export, and then import in the new package. I have a lof of assets in
each package. I am using the DB storage for the jcr repository.

After some months, the DB has grown a LOT! (like 3.5GB).

Is there a way regularly clean the JCR history, or maybe disable JCR
history as we are not using it at all?

These are the steps I did to remove the history and seems to work fine.
Does is seem safe? Is there a better way?

1.   Export the entire repository via guvor.

2.   Delete all the packages.

3.   Stop tomact

4.   truncate the following guvnor tables:

a.   Pm_ws_default_binval

b.  Pm_ws_default_bundel

c.   Versioning_pm_binval

d.  Versioning_pm_bundle

5.   Restated tomcat

6.   Import what I exported on step #1


Thanks!


Demian
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Problem when creating KieModuleModel

2014-01-15 Thread Demian Calcaprina
Hi Guys!

I am having a problem using drools 6 in my project. And I was able to
reproduce it in one of the examples..

I just got this example:

https://github.com/droolsjbpm/drools/tree/master/drools-examples-api/kiemodulemodel-example

built the 2 dependant projects, kiebase inclusion and namedkiesession.

Then, run the org.drools.example.api.kiemodulemodel.KieModuleModelExample
in my eclipse, and I get the following:

SLF4J: Failed to load class org.slf4j.impl.StaticLoggerBinder.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
details.
Exception in thread main java.lang.NullPointerException
at
org.drools.compiler.kie.builder.impl.KieBuilderImpl.generateKieModuleMetaInfo(KieBuilderImpl.java:222)
at
org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:194)
at
org.drools.example.api.kiemodulemodel.KieModuleModelExample.go(KieModuleModelExample.java:39)
at
org.drools.example.api.kiemodulemodel.KieModuleModelExample.main(KieModuleModelExample.java:63)


Exactly the same happens when I do the same in my project.

Any ideas?

Thanks!

Demian
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Problem when creating KieModuleModel

2014-01-15 Thread Demian Calcaprina
Thanks Mark, very instructive.


On Wed, Jan 15, 2014 at 5:21 PM, Mark Proctor mproc...@codehaus.org wrote:

 http://bit.ly/1eKm7lC

 Mark

 On 15 Jan 2014, at 19:35, Demian Calcaprina calcacue...@gmail.com wrote:

 Hi Guys!

 I am having a problem using drools 6 in my project. And I was able to
 reproduce it in one of the examples..

 I just got this example:


 https://github.com/droolsjbpm/drools/tree/master/drools-examples-api/kiemodulemodel-example

 built the 2 dependant projects, kiebase inclusion and namedkiesession.

 Then, run the org.drools.example.api.kiemodulemodel.KieModuleModelExample
 in my eclipse, and I get the following:

 SLF4J: Failed to load class org.slf4j.impl.StaticLoggerBinder.
 SLF4J: Defaulting to no-operation (NOP) logger implementation
 SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
 details.
 Exception in thread main java.lang.NullPointerException
 at
 org.drools.compiler.kie.builder.impl.KieBuilderImpl.generateKieModuleMetaInfo(KieBuilderImpl.java:222)
  at
 org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:194)
 at
 org.drools.example.api.kiemodulemodel.KieModuleModelExample.go(KieModuleModelExample.java:39)
  at
 org.drools.example.api.kiemodulemodel.KieModuleModelExample.main(KieModuleModelExample.java:63)


 Exactly the same happens when I do the same in my project.

 Any ideas?

 Thanks!

 Demian
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users



 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Problem with declare event

2014-01-14 Thread Demian Calcaprina
Hey Guys, I am having a drools compilation error when declaring an error.

I tried to isolate this as much as possible.

https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java#L43

I just added after the given line, this:
header = header +  declare Message\n +
 @role(event) \n  +
  end \n ;

And I get this exception:
java.lang.NullPointerException
at java.io.FilterOutputStream.write(FilterOutputStream.java:97)
at
org.drools.compiler.compiler.io.memory.MemoryFileSystem.writeJarEntries(MemoryFileSystem.java:437)
at
org.drools.compiler.compiler.io.memory.MemoryFileSystem.writeJarEntries(MemoryFileSystem.java:430)
at
org.drools.compiler.compiler.io.memory.MemoryFileSystem.writeJarEntries(MemoryFileSystem.java:430)
at
org.drools.compiler.compiler.io.memory.MemoryFileSystem.writeJarEntries(MemoryFileSystem.java:430)
at
org.drools.compiler.compiler.io.memory.MemoryFileSystem.zip(MemoryFileSystem.java:387)
at
org.drools.compiler.compiler.io.memory.MemoryFileSystem.writeAsBytes(MemoryFileSystem.java:365)
at
org.drools.compiler.kie.builder.impl.MemoryKieModule.getBytes(MemoryKieModule.java:64)
at
org.drools.compiler.CommonTestMethodBase.createKJar(CommonTestMethodBase.java:421)
at
org.drools.compiler.integrationtests.IncrementalCompilationTest.createAndDeployJar(IncrementalCompilationTest.java:205)
at
org.drools.compiler.integrationtests.IncrementalCompilationTest.testLoadOrderAfterRuleRemoval(IncrementalCompilationTest.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Any idea on how to declare an event on the drl?

Thanks!

Demian
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] What is the rest API to modify the import setting of a package in Guvnor?

2014-01-09 Thread Demian Calcaprina
yup, by updating the drools asset I was meaning a PUT  to the drools asset
:)


On Thu, Jan 9, 2014 at 10:38 PM, LeonJi whathappe...@gmail.com wrote:

 Thank you.
 With put method to
 http://host:port
 /guvnor/rest/packages/samplePackage/assets/drools/source,
 it resolve my problem perfectly.

 calcacuervo wrote
  I think you have to do it manually, updating the drools asset from the
  package.
 
  About pointing to the global area, I have not found a way to do it
 through
  the REST API.
 
  Demian





 --
 View this message in context:
 http://drools.46999.n3.nabble.com/What-is-the-rest-API-to-modify-the-import-setting-of-a-package-in-Guvnor-tp4027621p4027638.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Two Guvnor instances sharing repository

2013-11-09 Thread Demian Calcaprina
Hi Guys,

I have two guvnor instances. They are using a mysql db repository. I would
like both to point to the same database.

I configured them both to use the same database in the repository.xml, but
it starting throwing errors and they were not in sync.

Errors are like this

11:43:29,597 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper)
ARJUNA012117: TransactionReaper::check timeout for TX
0:7f000101:55ee0fc5:527e486a:3f in state  RUN
11:43:29,599 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0)
ARJUNA012095: Abort of action id 0:7f000101:55ee0fc5:527e486a:3f
invoked while multiple threads active within it.
11:43:29,601 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0)
ARJUNA012108: CheckedAction::check - atomic action
0:7f000101:55ee0fc5:527e486a:3f aborting with 1 threads active!
11:43:29,602 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0)
ARJUNA012121: TransactionReaper::doCancellations worker Thread[Transaction
Reaper Worker 0,5,main] successfully canceled TX
0:7f000101:55ee0fc5:527e486a:3f
11:44:37,245 INFO  [org.apache.jackrabbit.core.query.lucene.IndexMerger]
(jackrabbit-pool-5) merged 791 documents in 568 ms into _p.
11:44:37,377 INFO  [org.apache.jackrabbit.core.query.lucene.IndexMerger]
(jackrabbit-pool-2) merged 1370 documents in 709 ms into _o.
11:48:07,300 WARN  [org.jboss.seam.transaction.TransactionServletListener]
(http--127.0.0.1-8080-5) Error starting the transaction:
javax.transaction.NotSupportedException:
BaseTransaction.checkTransactionState - ARJUNA016051: thread is already
associated with a transaction!
at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin(BaseTransaction.java:63)
at
com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.begin(BaseTransactionManagerDelegate.java:65)
at
org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:142)
at org.jboss.seam.transaction.UTTransaction.begin(UTTransaction.java:51)
[seam-transaction-3.1.0.Final.jar:3.1.0.Final]
at
org.jboss.seam.transaction.DefaultSeamTransaction.begin(DefaultSeamTransaction.java:88)
[seam-transaction-3.1.0.Final.jar:3.1.0.Final]
at
org.jboss.seam.transaction.TransactionServletListener.requestInitialized(TransactionServletListener.java:110)
[seam-transaction-3.1.0.Final.jar:3.1.0.Final]
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
[jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
[jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
Caused by: java.lang.IllegalStateException:
BaseTransaction.checkTransactionState - ARJUNA016051: thread is already
associated with a transaction!
at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.checkTransactionState(BaseTransaction.java:257)
at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin(BaseTransaction.java:59)
... 13 more

I also tried both instances to also share the repository folder, both this
is failing because it lockes the file
Caused by: javax.jcr.RepositoryException: The repository home
/home/calcacuervo/development appears to be in use since the file named
.lock is locked by another process.
at
org.apache.jackrabbit.core.util.RepositoryLock.tryLock(RepositoryLock.java:166)


Any idea on how could I do it?

Thanks!

Demian
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Rule Example

2013-11-07 Thread Demian Calcaprina
It would be nice if you can put some of your requirements here. So that
people who has similar requirements may benefit for the discussion..

Regards,

Demian


On Thu, Nov 7, 2013 at 8:28 AM, chakez30 dspecialis...@yahoo.com wrote:

 rule if you have nothing good to say
 when
Response( information == Bully)
 then
System.out.println(Just shut up.);
 end



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Rule-Example-tp4026674p4026676.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] News from the community - 5.6.0.CR1 is out!

2013-11-01 Thread Demian Calcaprina
Thanks a lot Davide! This is really nice.
We will be using it soon and let the community know if we find something to
report.

Thanks again,

Demian


On Fri, Nov 1, 2013 at 6:04 PM, Davide Sottara dso...@gmail.com wrote:

 Finally Drools 5.6.0.CR1 community edition has been released!

 It has been mainly a community effort, driven by the use of Drools in
 several applications and research projects,
 but it was possible thanks to the collaboration of the main developer's
 team and the help of everybody
 who reported bugs, asked for new features and contributed with patches
 or additions.

 5.6 consolidates and finalizes the 5.x series. It comes with a number of
 bug fixes and a still experimental,
 but much more robust, second generation trait system - I will blog and
 document it as soon as I can find
 a moment next week.

 The release is candidate to allow for some broader testing by the
 community without requiring to download
 and compile the code. If no major issues are reported, it will become
 Final in a few weeks.

 Let's keep sharing, looking forward to even more exciting innovations in
 the 6.x series!

 Best
 Davide

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Help on writing a rule

2013-10-22 Thread Demian Calcaprina
Yes! I receive many price change events.. but, as I am using window length
= 1, I would expect to have the activation cancelled for the previous one?

I am not sure how to express this:
when there is some price change, and some signal, and there has not been
any order over the last minute, then place an order

The price change and signal are like existence facts.. If there is some
price change change.. if there is some signal ...

Would this be another way to achieve what I am trying to do?

Thanks,

Demian

PS: This is a simple rule, but then, the idea is to have more complex
rules.. like, if there has been 10 signals in the last time, place an
order, etc.


On Tue, Oct 22, 2013 at 5:40 PM, Davide Sottara dso...@gmail.com wrote:

 Am I wrong or do you have two PriceChange events - 392 and 394 ?
 If so, you can expect two activations.. when you fire al rules, one of
 the two
 will insert the OrderCreated, which in turn will cancel the other

 On 10/22/2013 01:34 PM, calcacuervo wrote:
  Hi Guys. I have one quesiton on how could I implement my rule.
  I have this rule:
  when
t : PriceChange() over window:length(1)
signal : Signal( id == 1234 ) over window:length(1)
not OrderCreated( id == 1234 ) over window:time (1m)
then
  insert(new OrderCreated(1234));
 
  Basically, when there is some signal and some price change, create a new
  order if  there has no been any other order in the last minute.
  But this sometimes is being fired twice:
  12:31:01,121 INFO  [org.drools.audit.WorkingMemoryConsoleLogger] (Camel
  (camel-1) thread #4 - JmsConsumer[marketDataTopic]) ACTIVATION CREATED
  rule:ertetr activationId:ertetr [393, 392, 0] declarations: t=PriceChange
  [](392); signal=Signal@1413ddef(393)
  12:31:01,160 INFO  [org.drools.audit.WorkingMemoryConsoleLogger] (Camel
  (camel-1) thread #4 - JmsConsumer[marketDataTopic]) ACTIVATION CREATED
  rule:ertetr activationId:ertetr [393, 394, 0] declarations: t=PriceChange
  [](394); signal=Signal@1413ddef(393)
 
  I think that, when the 1m window have passed, it creates twice the
  activations, as I have not called fire all rules yet. Does is make
 sense? Do
  you have some idea on how could I implement this rule? when there has
 been
  some price change and some signal, and I did not create a new order in
 the
  last minute, just create a new order.
 
  Thanks in advance!
 
  Demian
 
 
 
  --
  View this message in context:
 http://drools.46999.n3.nabble.com/Help-on-writing-a-rule-tp4026461.html
  Sent from the Drools: User forum mailing list archive at Nabble.com.
  ___
  rules-users mailing list
  rules-users@lists.jboss.org
  https://lists.jboss.org/mailman/listinfo/rules-users
 

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Help on writing a rule

2013-10-22 Thread Demian Calcaprina
Mauricio,

In fact, I used to have this and the price change without window:length..
but
when
t : PriceChange()
signal : Signal( id == 1234 )
not OrderCreated( id == 1234 ) over window:time (1m)

But this will cause more and more duplicates orders (and it have sense!). I
added the length window to 1, as I would only like to create an order if
there is some signal in the window, it can place an order..


On Tue, Oct 22, 2013 at 5:42 PM, Mauricio Salatino sala...@gmail.comwrote:

 Just curious here, why do you have this - signal : Signal( id == 1234
 ) over window:length(1)?


 On Tue, Oct 22, 2013 at 9:40 PM, Davide Sottara dso...@gmail.com wrote:

 Am I wrong or do you have two PriceChange events - 392 and 394 ?
 If so, you can expect two activations.. when you fire al rules, one of
 the two
 will insert the OrderCreated, which in turn will cancel the other

 On 10/22/2013 01:34 PM, calcacuervo wrote:
  Hi Guys. I have one quesiton on how could I implement my rule.
  I have this rule:
  when
t : PriceChange() over window:length(1)
signal : Signal( id == 1234 ) over window:length(1)
not OrderCreated( id == 1234 ) over window:time (1m)
then
  insert(new OrderCreated(1234));
 
  Basically, when there is some signal and some price change, create a new
  order if  there has no been any other order in the last minute.
  But this sometimes is being fired twice:
  12:31:01,121 INFO  [org.drools.audit.WorkingMemoryConsoleLogger] (Camel
  (camel-1) thread #4 - JmsConsumer[marketDataTopic]) ACTIVATION CREATED
  rule:ertetr activationId:ertetr [393, 392, 0] declarations:
 t=PriceChange
  [](392); signal=Signal@1413ddef(393)
  12:31:01,160 INFO  [org.drools.audit.WorkingMemoryConsoleLogger] (Camel
  (camel-1) thread #4 - JmsConsumer[marketDataTopic]) ACTIVATION CREATED
  rule:ertetr activationId:ertetr [393, 394, 0] declarations:
 t=PriceChange
  [](394); signal=Signal@1413ddef(393)
 
  I think that, when the 1m window have passed, it creates twice the
  activations, as I have not called fire all rules yet. Does is make
 sense? Do
  you have some idea on how could I implement this rule? when there has
 been
  some price change and some signal, and I did not create a new order in
 the
  last minute, just create a new order.
 
  Thanks in advance!
 
  Demian
 
 
 
  --
  View this message in context:
 http://drools.46999.n3.nabble.com/Help-on-writing-a-rule-tp4026461.html
  Sent from the Drools: User forum mailing list archive at Nabble.com.
  ___
  rules-users mailing list
  rules-users@lists.jboss.org
  https://lists.jboss.org/mailman/listinfo/rules-users
 

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users




 --
  - MyJourney @ http://salaboy.com http://salaboy.wordpress.com
  - Co-Founder @ http://www.jugargentina.org
  - Co-Founder @ http://www.jbug.com.ar

  - Salatino Salaboy Mauricio -

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] AfterEvaluatorDefinition NullPointer Exception in deserialized ksession

2013-10-11 Thread Demian Calcaprina
Hey Alexander,

Would this be related to this?

https://issues.jboss.org/browse/DROOLS-243

If it is this one, you can do something like this as a workaround before
constructing the KBase:

Operator op = BeforeEvaluatorDefinition.BEFORE;
Operator op = AfterEvaluatorDefinition.AFTER;

This will cause the evaluation definition to be put in  memory.

Hope this helps!

Demian


On Fri, Oct 11, 2013 at 9:21 AM, Alexander Wolf m...@alexander-wolf.netwrote:

 [Drools 5.5.0 Final]

 I wrote a webserver that keeps StatefulKnowledgeSessions running in Stream
 mode. When the server is stopped, the sessions are serialized and stored in
 a database. When the server is restarted, the existing sessions are
 restored / deserialized.

 Some time after recreating the session and inserting some events I get the
 following exception:

 java.lang.NullPointerException: null
 at
 org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluateCachedLeft(AfterEvaluatorDefinition.java:351)
 ...

 Apparently the exception seems to be related to a rule that uses temporal
 reasoning.
 After getting it once, the session seems to be corrupt - from now on
 every time I call ksession.insert(event) the same exception occurs.
 When I serialize the session and attempt to deserialize it, I get a long
 stack trace -- I can not deserialize it anymore. (as apparently it is
 corrupted).
 When I run the server with the same events/sessions without stopping
 (serialization/deserialization) the exception does not occur)

 Can I do anything to prevent this behaviour? I thought maybe the after
 timer/trigger is somehow still active when I serialize the ksession.
 I tried ksession.halt() before serialization, but with no effect.

 Any ideas?

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] AfterEvaluatorDefinition NullPointer Exception in deserialized ksession

2013-10-11 Thread Demian Calcaprina
Yes.. but you can include these two lines before this, to check.

Operator op = BeforeEvaluatorDefinition.BEFORE;
Operator op = AfterEvaluatorDefinition.AFTER;

The problem in that, for example, for the before,

https://github.com/droolsjbpm/drools/blob/5.5.x/drools-core/src/main/java/org/drools/base/evaluators/BeforeEvaluatorDefinition.java#L82

If you don-t mention not use this class before trying to unmarshall it, the
operator is not added to the operators registry, and thus NPE is thrown.

 public static final Operator BEFORE=
Operator.addOperatorToRegistry( before,

  false );

In the ticket I included a patch to fix it, I have one thing pending to add
to the pull request in order to be ready to be merged. But the workaround
of just mentioning the evaluator definitions so they are added to the
operators list, before doing the unmarshall, has worked for me.

Thanks,

Demian

Demian


On Fri, Oct 11, 2013 at 12:09 PM, Alexander Wolf m...@alexander-wolf.netwrote:

 Hey Demian,

 thank you! This might actually be related. But how do I get the reference
 to these Operators to (re)set them?

 This is my unmarshalling code (pretty simple and basic..):

 ByteArrayInputStream bais = new ByteArrayInputStream(
 serializedKnowledgeBase);
 ObjectInputStream ois = new ObjectInputStream(bais);
 kbase = (KnowledgeBase)ois.readObject();

 Marshaller marshaller = MarshallerFactory.newMarshaller(kbase);
 ByteArrayInputStream bais2 = new ByteArrayInputStream(
 serializedKnowledgeSession);
 knowledgeSession = marshaller.unmarshall(bais2);

 Also: Is this going to be fixed in 5.6.0 ? (@Mark Proctor?)

 - Alex


 On 11.10.2013, at 16:09, Demian Calcaprina calcacue...@gmail.com wrote:

 Hey Alexander,

 Would this be related to this?

 https://issues.jboss.org/browse/DROOLS-243

 If it is this one, you can do something like this as a workaround before
 constructing the KBase:

 Operator op = BeforeEvaluatorDefinition.BEFORE;
 Operator op = AfterEvaluatorDefinition.AFTER;

 This will cause the evaluation definition to be put in  memory.

 Hope this helps!

 Demian


 On Fri, Oct 11, 2013 at 9:21 AM, Alexander Wolf 
 m...@alexander-wolf.netwrote:

 [Drools 5.5.0 Final]

 I wrote a webserver that keeps StatefulKnowledgeSessions running in
 Stream mode. When the server is stopped, the sessions are serialized and
 stored in a database. When the server is restarted, the existing sessions
 are restored / deserialized.

 Some time after recreating the session and inserting some events I get
 the following exception:

 java.lang.NullPointerException: null
 at
 org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluateCachedLeft(AfterEvaluatorDefinition.java:351)
 ...

 Apparently the exception seems to be related to a rule that uses temporal
 reasoning.
 After getting it once, the session seems to be corrupt - from now on
 every time I call ksession.insert(event) the same exception occurs.
 When I serialize the session and attempt to deserialize it, I get a long
 stack trace -- I can not deserialize it anymore. (as apparently it is
 corrupted).
 When I run the server with the same events/sessions without stopping
 (serialization/deserialization) the exception does not occur)

 Can I do anything to prevent this behaviour? I thought maybe the after
 timer/trigger is somehow still active when I serialize the ksession.
 I tried ksession.halt() before serialization, but with no effect.

 Any ideas?

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users


 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users



 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Guvnor REST api, compile package

2013-09-04 Thread Demian Calcaprina
About 1, .../rest/packages/{packageName}/binary will triger the compile and
then return the PKG. But not sure what will happen if the compilation
fails.. you can try!

From the documentation:
Returns the compiled binary of the package {packageName} as a binary
stream. If the package has not been compiled yet or its binary is not up to
date, this will compile the package first.


On Wed, Sep 4, 2013 at 8:06 PM, anchi harij...@ovi.com wrote:

 Ok, I somehow managed to resolve question 3 and 3.a. But questions 1. and
 2.
 remain, please point me to the right direction.

 What I need is to build a package and if build was successful then create a
 new snapshot.
 My problem is how to build a package?

 I found out that creating a new snapshot by calling
 .../rest/packages/{packageName}/snapshot/{snapshotName} *sometimes*
 triggers
 package build. But I cannot figure out how is this determined?

 What I've found out is:
 1. Approach that doesn't work:
   - update package version by sending modified package metadata to
 .../rest/packages/{packageName} (I basically just change package
 description)
   - then trigger creation of new snapshot with REST request
 It does not compile the package

 2. Approach that works:
  - click Save in Guvnor console (which changes package version)
  - then trigger creation of new snapshot with REST request
 Package is compiled

 So where is the catch? How can I make sure that package is built before
 creating a snapshot?
 I don't really see a point of having a REST interface if it still requires
 to use Guvnor console for being able to use a knowledge base packages




 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Guvnor-REST-api-compile-package-tp4025756p4025811.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Problem with PKG from guvnor

2013-08-27 Thread Demian Calcaprina
Thanks Genene.

In fact I was able to get the cause of my issue. I created a ticket with
the explanation and a pull request with a possible solution.

https://issues.jboss.org/browse/DROOLS-243

Thanks,

Demian


On Tue, Aug 27, 2013 at 12:26 PM, Genene Geda gg...@ghx.com wrote:

 Hi-,
 I think I had similar issue and resolved by looking at one of these:

 1. How the changes set is loaded:

 Resource changeset = ResourceFactory.newFileResource(changeSetFilePath);
 //.newClassPathResource(changeSetPath);

 2.If the package not yet built,  In GUVNOR, I go to 'knowledgebase'/ click
 on you package/click on the 'edit' tab on the right/ click build package  (
 I also do create snapshot but may not be necessary ).

 See if it helps.

 G-

 -Original Message-
 From: rules-users-boun...@lists.jboss.org [mailto:
 rules-users-boun...@lists.jboss.org] On Behalf Of calcacuervo
 Sent: Monday, August 26, 2013 10:26 PM
 To: rules-users@lists.jboss.org
 Subject: [rules-users] Problem with PKG from guvnor

 Hi Guys,

 I am having a problem using Drools 5.5.

 Basically, I have a ksession in stream mode.

 I have a rule with an event, like this

 when
 myfact: EventA( main  21 ) over window:length (1)
 myfact2 : EventA( main = 21 , this before myfact ) over
 window:length (2)

 I also use a KnowledgeAgent and apply a changeset.

 If I declare this rule directly from the changeset, as a Classpath
 resource, with resource type DRL, it seems to work fine (the kbase
 compiles!).

 But If I have the rule in a guvnor package, and I put the PKG link in my
 changeset, I am getting an error:

 Caused by: java.lang.NullPointerException
 at

 org.drools.base.evaluators.BeforeEvaluatorDefinition$BeforeEvaluator.getInterval(BeforeEvaluatorDefinition.java:268)
 [drools-core-5.5.0.Final.jar:5.5.0.Final]
 at

 org.drools.rule.constraint.EvaluatorConstraint.getInterval(EvaluatorConstraint.java:100)
 [drools-core-5.5.0.Final.jar:5.5.0.Final]
 at

 org.drools.reteoo.builder.BuildUtils.gatherTemporalRelationships(BuildUtils.java:326)
 [drools-core-5.5.0.Final.jar:5.5.0.Final]
 at

 org.drools.reteoo.builder.BuildUtils.calculateTemporalDistance(BuildUtils.java:292)
 [drools-core-5.5.0.Final.jar:5.5.0.Final]
 at

 org.drools.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:119)
 [drools-core-5.5.0.Final.jar:5.5.0.Final]
 at org.drools.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:113)
 [drools-core-5.5.0.Final.jar:5.5.0.Final]
 at
 org.drools.reteoo.ReteooRuleBase.addRule(ReteooRuleBase.java:445)
 [drools-core-5.5.0.Final.jar:5.5.0.Final]

 It seems that that getOperator() is null in this evaluation:
 if ( this.getOperator().isNegated() ) {

 I debugged a bit, and it seems the evaluator comes in serialized from
 guvnor's package.But in case of getting directly the classpath resource, it
 compiles the package and it gets the real operator ok (Operator = 'before')

 Do you have any idea of why it could be happening? May I be doing
 something wrong? Is this a bug in guvnor?

 Thanks in advance!

 Demian



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Problem-with-PKG-from-guvnor-tp4025687.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Problem with Guvnor using Rest API

2013-07-13 Thread Demian Calcaprina
Hey Guys.

I am using guvnor 5.5.0.Final.

I am accesing to from another app using the REST API. I am currently having
a problem. I create a new package, sending a post to guvnor/rest/packages/,
sending it an xml version of PackageMetadata. Then, I create assets (drl
files), by sending a post to guvnor/rest/packages/ + packageName +
/asset, with the drl contents. This works fine. The problem in with
package building. I read somewhere that it is automatically built when you
create a new asset or update one. But just after creating the package, I go
to the package url, the one I configure in the changeset,
localhost:8080/guvnor/org.drools.guvnor.Guvnor/package/mypackage/LATEST,
and I get a NPE,

java.lang.NullPointerException
java.io.OutputStream.write(OutputStream.java:75)

org.drools.guvnor.server.files.FileManagerService.loadBinaryPackage(FileManagerService.java:201)

org.drools.guvnor.server.files.FileManagerService$Proxy$_$$_WeldClientProxy.loadBinaryPackage(FileManagerService$Proxy$_$$_WeldClientProxy.java)

org.drools.guvnor.server.files.PackageDeploymentServlet$1.execute(PackageDeploymentServlet.java:260)

org.drools.guvnor.server.files.RepositoryServlet.doAuthorizedAction(RepositoryServlet.java:59)

org.drools.guvnor.server.files.PackageDeploymentServlet.doGet(PackageDeploymentServlet.java:139)
javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)

org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)

org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)


If I  build the package manually, I am able to get the PKG there. I am
making something wrong? Is there a way to make it build the package
from REST?

Thanks!


Demian
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Guvnor Rest API for uploading model

2013-05-29 Thread Demian Calcaprina
Great, thanks for that. I just copied also the drools header from global
package to my new package and worked!


On Wed, May 29, 2013 at 5:13 AM, rjr201 rich.j.ri...@gmail.com wrote:

 I think this might be the same problem I was having..

 http://drools.46999.n3.nabble.com/Uploading-JAR-using-REST-td4022115.html#a4022202



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Guvnor-Rest-API-for-uploading-model-tp4024007p4024010.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] BPMN2 Question

2013-05-19 Thread Demian Calcaprina
I guess you have a process with an split node with some condition? It seems
that in the condition there is something called session that it is not
being found?


On Sun, May 19, 2013 at 4:42 PM, starfish15 pooja.gh...@accenture.comwrote:

 Hello,

 I am very new to BPMN. We are currently using Drools 5.3 version. I face
 the
 below error when i run the project. Also am trying to understand the
 running
 of Call Activity. Anyways a flow does begin running and then it gives the
 following error

 java.lang.NoSuchFieldError: session
 at

 org.jbpm.process.instance.impl.MVELReturnValueEvaluator.evaluate(MVELReturnValueEvaluator.java:91)
 at

 org.jbpm.process.instance.impl.ReturnValueConstraintEvaluator.evaluate(ReturnValueConstraintEvaluator.java:128)
 at

 org.jbpm.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:72)
 at

 org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124)
 at

 org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:205)
 at

 org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:164)
 at

 org.jbpm.workflow.instance.node.ActionNodeInstance.triggerCompleted(ActionNodeInstance.java:55)
 at

 org.jbpm.workflow.instance.node.ActionNodeInstance.internalTrigger(ActionNodeInstance.java:51)
 at

 org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124)


 Not sure i understood this error. Would appreciate if some help could be
 provided with what the error meant exactly.

 Regards,
 starfish.



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/BPMN2-Question-tp4023888.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Status of GuvnorNG

2013-04-01 Thread Demian Calcaprina
Hey Michael. I am just trying to open the existing rules in Guvnor
Playground project. And I get an error in the screen,

Unable to complete your request. The following exception occurred: Unable
to get KieModule, Errors Existed.

and some into the logs,

2013-04-01 11:22:49,571 [http-bio-8080-exec-2] ERROR Unable to build
KieBaseMode
l:defaultKieBase
Unable to resolve ObjectType 'Bean' : [Rule name='R1']

Rule Compilation error : [Rule name='R1']
org/kie/test/Rule_R191081925.java (7:356) : $b cannot be resolved

Rule Compilation error : [Rule name='Init']
org/kie/test/Rule_Init1712781913.java (7:346) : Bean cannot be
resolved
to a type


Then, I also created a new project, and then tried to create a new Guided
DRL, and I am getting errors in logs..

org.jboss.errai.bus.client.api.base.MessageDeliveryFailure: error invoking
endpo
int
at
org.jboss.errai.bus.server.io.ConversationalEndpointCallback.callback
(ConversationalEndpointCallback.java:132)
at
org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteSe
rviceCallback.java:54)
at
org.jboss.errai.cdi.server.CDIExtensionPoints$3.callback(CDIExtension
Points.java:512)
at
org.jboss.errai.bus.client.framework.DeliveryPlan.deliver(DeliveryPla
n.java:43)
at
org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMess
ageBusImpl.java:632)
at
org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDisp
atcher.java:46)
at
org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServic
eImpl.java:93)
at
org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServic
eImpl.java:107)
at
org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(Defa
ultBlockingServlet.java:117)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:210)
at
org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFire
SecurityFilter.java:221)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:225)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:169)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:168)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:98)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
927)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp
11Processor.java:999)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
AbstractProtocol.java:565)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoin
t.java:307)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NoClassDefFoundError:
org/apache/tools/ant/AntClassLoader
at
org.kie.scanner.embedder.MavenEmbedder.init(MavenEmbedder.java:104)

at
org.kie.scanner.embedder.MavenEmbedder.init(MavenEmbedder.java:131)

at
org.kie.scanner.embedder.MavenProjectLoader.parseMavenPom(MavenProjec
tLoader.java:35)
at
org.kie.scanner.ArtifactResolver.getResolverFor(ArtifactResolver.java
:72)
at
org.kie.scanner.KieModuleMetaDataImpl.init(KieModuleMetaDataImpl.ja
va:66)
at
org.kie.scanner.KieModuleMetaData$Factory.newKieModuleMetaData(KieMod
uleMetaData.java:26)
at
org.kie.guvnor.datamodel.backend.server.cache.LRUProjectDataModelOrac
leCache.makeProjectDefinition(LRUProjectDataModelOracleCache.java:107)
at
org.kie.guvnor.datamodel.backend.server.cache.LRUProjectDataModelOrac
leCache.assertProjectDataModelOracle(LRUProjectDataModelOracleCache.java:74)
at
org.kie.guvnor.datamodel.backend.server.cache.LRUProjectDataModelOrac
leCache$Proxy$_$$_WeldClientProxy.assertProjectDataModelOracle(LRUProjectDataMod
elOracleCache$Proxy$_$$_WeldClientProxy.java)
at
org.kie.guvnor.datamodel.backend.server.cache.LRUDataModelOracleCache

Re: [rules-users] Guvnor - Operations with snapshots

2011-10-09 Thread Demian Calcaprina
Jervis, thanks for the response!

When is a package updated? In 5.2, I could make version to be updates
through UI, explicitly using Save Changes. Is there another way to achieve
it?

Thanks again,

Demian

2011/10/8 jliu j...@redhat.com

  On 2011/10/7 9:54, Demian Calcaprina wrote:

 Hi again.

  I have been able to use guvnor package versions with some success..

  Is there any service I can call to create a new version? I have checked
 that it seems to change the package version when you click on save
 package. Can I have some URL to achieve it automatically?

  Hi,

 Sorry for the late response, I was in holiday. There is no REST service to
 create a package version as this is not needed. A package version is created
 automatically when your package gets updated (through Guvnor UI or through
 REST).

 Cheers,
 Jervis

  Thanks

  Demian

 On Tue, Oct 4, 2011 at 9:57 AM, Demian Calcaprina 
 calcacue...@gmail.comwrote:

 Thanks Jervis.

  I currently use Guvnor 5.2, and saw that I can use version so I will try
 to use them.

  - Is there something I will be missing about versions, by using 5.2?
  - Do you know when a new version is created? With Snapshots, I could
 choose when to create a new one. How about versions?

  Thanks!

  Demian

   2011/10/3 jliu j...@redhat.com

   On 2011/10/4 1:54, Demian Calcaprina wrote:

 Hi everyone. I am using Guvnor 5.2, and I need to make some operations
 from my application.

  Specifically, I need to make two operations remotely:
 - List Snapshots, as it is possible to list packages.
 - Create a new snapshot from a package.

  Is this possible to make these operation through rest API?

   Hi,

 Start from 5.3, Guvnor Packages are fully versioned. I would recommend
 you to use a vesioned package instead of package snapshot. Package snapshot
 will be deprecated in the future.

 Cheers,
 Jervis

 Thanks,

  Demian




 ___
 rules-users mailing 
 listrules-users@lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users



 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users





 ___
 rules-users mailing 
 listrules-users@lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users



 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor - Operations with snapshots

2011-10-06 Thread Demian Calcaprina
Hi again.

I have been able to use guvnor package versions with some success..

Is there any service I can call to create a new version? I have checked that
it seems to change the package version when you click on save package. Can
I have some URL to achieve it automatically?

Thanks

Demian

On Tue, Oct 4, 2011 at 9:57 AM, Demian Calcaprina calcacue...@gmail.comwrote:

 Thanks Jervis.

 I currently use Guvnor 5.2, and saw that I can use version so I will try to
 use them.

 - Is there something I will be missing about versions, by using 5.2?
 - Do you know when a new version is created? With Snapshots, I could choose
 when to create a new one. How about versions?

 Thanks!

 Demian

 2011/10/3 jliu j...@redhat.com

  On 2011/10/4 1:54, Demian Calcaprina wrote:

 Hi everyone. I am using Guvnor 5.2, and I need to make some operations
 from my application.

  Specifically, I need to make two operations remotely:
 - List Snapshots, as it is possible to list packages.
 - Create a new snapshot from a package.

  Is this possible to make these operation through rest API?

  Hi,

 Start from 5.3, Guvnor Packages are fully versioned. I would recommend you
 to use a vesioned package instead of package snapshot. Package snapshot will
 be deprecated in the future.

 Cheers,
 Jervis

 Thanks,

  Demian




 ___
 rules-users mailing 
 listrules-users@lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users



 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users



___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor - Operations with snapshots

2011-10-04 Thread Demian Calcaprina
Thanks Jervis.

I currently use Guvnor 5.2, and saw that I can use version so I will try to
use them.

- Is there something I will be missing about versions, by using 5.2?
- Do you know when a new version is created? With Snapshots, I could choose
when to create a new one. How about versions?

Thanks!

Demian

2011/10/3 jliu j...@redhat.com

  On 2011/10/4 1:54, Demian Calcaprina wrote:

 Hi everyone. I am using Guvnor 5.2, and I need to make some operations from
 my application.

  Specifically, I need to make two operations remotely:
 - List Snapshots, as it is possible to list packages.
 - Create a new snapshot from a package.

  Is this possible to make these operation through rest API?

  Hi,

 Start from 5.3, Guvnor Packages are fully versioned. I would recommend you
 to use a vesioned package instead of package snapshot. Package snapshot will
 be deprecated in the future.

 Cheers,
 Jervis

 Thanks,

  Demian




 ___
 rules-users mailing 
 listrules-users@lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users



 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Guvnor - Operations with snapshots

2011-10-03 Thread Demian Calcaprina
Hi everyone. I am using Guvnor 5.2, and I need to make some operations from
my application.

Specifically, I need to make two operations remotely:
- List Snapshots, as it is possible to list packages.
- Create a new snapshot from a package.

Is this possible to make these operation through rest API?

Thanks,

Demian
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users