Muffy Paine

Greenhorn
+ Follow
since Nov 07, 2017
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Muffy Paine

I liked your Analogy Junilu, and I completely see there are multiple blind spots here, we have no idea how the before and after Work flow steps are coded. We have asked the vendor to code that for us. I appreciate all your help you all provided and would look for help in the future, but next time I would be more precise
6 years ago
Yes it's a third party online web based application processing tool that we are using. I am willing to learn Java and want to test out some codes, we do have a test environment where I can insert formulas and play around as well. That's the reason i asked if someone can provide me some codes so I can go in test and see what results i get. How do I complete the below code:

if (ThreadLocalRandom.current().nextInt(100) < 20) {step.WorkflowStep = "Installation"
 
}

I do appreciate all your help guys..
6 years ago
Thanks Junilu, I believe that we just need to provide the code and not worry about the imports as the tool might take care of that. Also the code you mentioned as incorrect Java Code I would be interested to see what would be the accurate one, one of the formula requirements is that (it must evaluate to either tue or false).

So how do I insert the Random Program you gave into the following logic? create a random number between 0 and 1 when the enrollment is in WorkFlow Step = "Installation" , if <= 0.2 then do the Work Flow Step = "QA QC" else Work Flow Step = "Post Inspection"

6 years ago
Thanks Paul. Our programming guy has left and we won't have another one till next month. I am all database and no programming. I am just trying to help the team. I was also thinking that we might have to use 'random' here. So how would we translate into Java the following 'Create a random number between 0 and 1
If it's less than 0.2 then do the extra workflow step' ?

Let me give you an example of a code which was used in the past within the same formula box for another purpose so we know the structure of the code that's been used.




We would be concerned with the following below Work Flow steps for our code: So basically create a random number between 0 and 1 when the enrollment is in WorkFlow Step = "Installation" , if <= 0.2 then do the Work Flow Step = "QA QC" else Work Flow Step = "Post Inspection" . Can I get some help to get started with the code?

Thanks Again for your help, really appreciate it.




6 years ago
Thanks for the info. How would a code in general look like for a problem I am trying to solve.
6 years ago
what do you mean by the 'environment' can you explain
6 years ago
Let me give you guys more information so it is better understood. All the Work Flow Steps are already configured.  Here how it works, an enrollment has to go through the following Work Flow Steps: Application, Installation, Post Inspection and Payment. Whenever each step is completed another one automatically kicks off. We created another Work flow step 'QA QC' that comes after Installation and before Post Inspection. We only want QA QC work flow step to be created only 20 % of the time or 1 out of 5 enrollments that come in Installation Workf flow step needs to have a QA QC Work flow step, the rest can directly go to Post Inspection WFS. We have been told it can be done through a java formula.

So basically every n, n+4 enrollment needs to have a QA QC work flow step and the rest does not.

Let me know if that makes sense.
6 years ago
Nope, all the Work Flow Steps have already been coded by the vendor, we just need to add a formula for our specific purpose.

6 years ago
Thats right we can configure each Work Flow Step, we just have to type a VB or Java logic/formula in the box.
6 years ago
I am a newbie with Java. On each workflow step we can 'Enable conditional Step creation with a formula(must evaluate either True or False)' snapshot attached. We can get to the Workflow Step as follows, pic attached. I want this step to be only created 20% of the time or 1 in 4 of every enrollment that comes along. I am unable to write this in Java.

Thanks for all your help



6 years ago
Hello,

First time here, exploring this forum.

I have 2 questions:

1) Can somebody help me out converting the following python code to Java.

from random import randint

count =  0
QAQC = 0
POST = 0

while count < 1000:
   result = randint(0,100)
   if result >= 1 and result <= 20:
       QAQC += 1

   else:
       POST += 1
       
   count += 1
     
print(QAQC)
print(POST)

2) We use a web based application tool to process enrollments and each enrollment goes through a multiple Work Flow Step Process. The main problem I am trying to solve here is to kick off a particular Workflow Step only 20% of time or probably every N+4 time and the remaining could go into the regular Work Flow Step. So basically only 20% of the enrollment needs to have that extra WFS. The above python script uses random function I believe, not sure how helpful would that be.

Any ideas or suggestions would be really appreciated.

Thanks
6 years ago