I am working on Generated Task Forms, I am trying to apply true/false logic in exclusive gateway. If true, end process. If false, redirect to data correction task.
<bpmn:sequenceFlow id="SequenceFlow_180tuqy" name="Yes" sourceRef="ExclusiveGateway_1gplnrv" targetRef="EndEvent_16krmz0">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${approved}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_1" name="No" sourceRef="ExclusiveGateway_1gplnrv" targetRef="stock_management">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${!approved}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
here ${approved} -> approved is the id of the boolean form fied, but it does not work.
what I need to mention in bpmn:conditionExpression?
First:
I´d like to ask if you write the BPMN-File yourself? Because there´s also a tool for it:
https://camunda.org/bpmn/tool/
Second:
On first sight I can´t see where there would be a problem. It looks ok to me. Often Camunda has problems with variables in conditions.
Try to write ${approved == true} instead of ${approved} and ${approved == false} instead of ${!approved}. If this doen´t work, maybe the problem lies elsewhere.
EDIT:
May you please explain what exactly happens, when quote "it does not work"?
Related
I have a web app that is all run via one perl file that works with a database. At one point the user can execute an action that takes a lot of time (it adds a bunch of rows from one table to another). Is there a way I can have a wait .gif or message show while the sql is executing, and then have it disappear once it's over? I'm pretty new to perl, saw that this was possible through Javascript and the PleaseWaitButton though. Any help would be much appreciate though. My code for the lengthy update part is below, so I image whatever thing would need to be inserted somewhere in there:
if((#inTable[0])==0){
my $update = `perl /stockhistory.pl
my #updatearray = split(" ", $update);
my $val;
for(my $i = 0; $i < scalar #updatearray; $i+=6){
$val = eval{ExecSQL($dbuser, $dbpasswd, "insert into PORT_ModernData (SYMBOL, TIME, OPEN, HIGH, LOW, CLOSE, VOLUME) VALUES (?,?,?,?,?,?,?)",undef, $stocksy,, $updatearray[$i], $updatearray[$i+1], $updatearray[$i+2], $updatearray[$i+3], $updatearray[$i+4], $updatearray[$i+5]);};
}
}
Thanks for any and all help!
The way I understand your problem, I would suggest Javascript, though I do like avoiding it myself.
This way, the user can click the button, triggering the sql get, and the message comes up, while the server does what it does, when done, Javascript can tell the user so and provide the link, data or whatever the result is.
With perl, this would involve a more complicated procedure including further server/client communication.
I would gladly be corrected, though, if anyone knows better.
Am trying to validate some data in the view using Robotium.
I have written the below code for the same:
NegativeExpected=false;
solo.clickOnButton(0);
solo.sleep(10000);
actual= solo.searchText("Jan-12");
actual= solo.searchText("Feb-12");
actual= solo.searchText("Jul-12");
actual= solo.searchText("Aug-12");
assertEquals(NegativeExpected,actual);
Here what I am trying to do is to check the presence of the list of data and if present the test case has to fail. ie., AssertFalse operation.
But even when the values are present, the test case is never failing and is passing. Am really not able to understand why its happening so. Am really at a fix.
Please help me out.
Thanks.
Use assertEquals(NegativeExpected,actual);after every
actual= solo.searchText("Jan-12");("Feb-12")..
because in your present code, it is checking the assert condition only for the last
actual= solo.searchText("Jan-12");
or you can define them as actual1, actual2...and use and/or operator among them in your final assertEquals(..)according to your requirement.
and if negative expected is noy working then try !actualas
assertEquals(Expected,!actual);
Another way to do this id:
AssertFalse(solo.searchText("Jan-12"));
You could use this for each one.
actual &= solo.search("xxx");
so that you won't lost your total actual value.
I am new here. I am very happy that I joined this website, because everyone here is so smart!
Now, let's cut to the chase! Hopefully, I will be able to explain everything properly.
I am creating a Visual Basic application. It's supposed to reassemble a so-called "fake programming language." It's having some issues though.
Let me show you an example before explaining:
If RichTextBox1.Text.Contains("console output >'insert comment';") then
Console.WriteLine("insert comment")
End If
Now, what I want here is a custom input. (if someone types "I want cookies" then I want the console to say that!
For instance, if I type:
If RichTextBox1.Text.Contains("console output >'Insert something here';") then
Console.WriteLine("Whatever the user wrote!")
End If
I just want to possibility to write whatever I want, that's all! I hope I made myself clear, because I am having a hard time explaining here. Help is appreciated! Thank you!
You need to match just the part with the console output > and then replace that portion of the string with empty space, like this:
If RichTextBox1.Text.Contains("console output >") Then
Console.WriteLine(Replace(RichTextBox1.Text, "console output >", ""));
End If
In the same below, I cannot seem to get a bold around the $(Product) name, whatever I try.
If I remove the IsBodyHTML, then I see the <b>xxxx</b> in my email. I tried both "True" and "true" for the IsBodyHtml value.
<MSBuild.Community.Tasks.Mail Condition="'$(SendMailSuccess)' == true"
SmtpServer="$(MyServer)"
To="$(ErrorEmails)"
From="$(FromEmail)"
Subject="Build succeeded for $(ProductName)"
IsBodyHtml="True"
Body="The application %3Cb%3E$(ProductName)%3C%2Fb%3E was built successfully on ServerX."
/>
It's working now. Dumb mistake, I had two routines, one for success, one for failure, and only one of the two had the IsBodyHTML on it.
I have currently a website which lets every user register, but I want to give out codes, so that only users with a special code can register. I already worked with validation, but I really need your help for doing this.
At first, I have my form which lets the user register and where the user can input the code.
Then I have the User Model, which should containt the validation checks:
validates :registration_codes, :presence => true, ??? => ???
I can get my reg_codes in any form, because I haven't created them yet. Maybe I will just update them manually and hardcode or maybe I will make a model. I don't know. So, what I just need is the validation check which should do something like this:
:registration_code should be code1 or code2 or code3
I have even tried to make a custom method, but I didn't find out how to forward the form input to my method.
Thanks for any help!
I wrote an custom method, which I call by:
validate :validate_regcode
And then I just search in the DB for the code and check if the result is empty:
def validate_regcode
regcode_feed = Code.where("regcode = ?", regcode)
if regcode_feed.empty?
errors.add(:regcode, "Ihr Registrierungscode ist leider ungültig.")
end
end
So, at all, it's really simple if you know the way to do it. Maybe there's something even simpler, but I like my way :)