spring batch: how to add dependency between steps running in parallel thread - spring-batch

I have a Spring batch Job which internally uses "splits' to run a sequence of steps in parallel.
For example:
Job's first step = "A"
"A" splits into 2 parallel flows:
1) B1 -> B2 -> B3 -> B4
2) C1 -> C2 -> C3 -> C4
B1, B2, B3 and B4 are sequential steps running in one spring batch "flow" and C1, C2, C3 and C4 are another set of sequential steps running in another spring batch "flow".
I want to run C3 only when B3 finishes. Is there any way to achieve this?

This is a more like a flow design issue rather than a feasibility issue with Spring Batch. You can't want to run two tasks in parallel where one task depends on the other. Going parallel means each flow can run independently from other flows running in parallel.
You need to redesign your flow using sub-flows. Since C3 depends on B3, you could probably split your flows into something like:
B1 -> B2
\
B3 -> B4
/ \
C1 -> C2 C3 -> C4
It is technically possible to do what you want without changing your flow definition (like using a shared boolean between B3 and C3 and make C3 wait on it) but this is an ugly work around the flow design issue.

Related

junit TEST_ID doesn't change every time i run junit

i am begineer in JUnit and has this issue can anyone please help me here.
Whenever i run JUnit the TEST_ID remains same and the values also.
for example:
****************TEST_ID_3****
a2
b3
Here no matter how many times i run JUnit for this class the TEST_ID is TEST_ID_3.
In this test case have called a method in which these values should increment and value of b3 should be one greater than a2. but the values also remain the same every time.
Can anyone help please.
Thank you in advance

Sum Left Outer Join In Subreport

I am working in a sub report. Visual Studio 2010 if relevant.
My first table has a unique record for every row in the details section. I am then attempting to use a Left Outer Join to join a second table to the first but then sum those values where there may be more than one row in table two per table one.
Right now I am having a problem with row duplication and the values from table two will not sum and instead print out individually. I have tried using groups and tried using Sum formula fields without success.
My first table is unique on a Record Number, Component and Sequence.
My second table also has those three items but may contain no record per the first table, one or multiple.
The Record Number and Component are passed to the report as parameters and are used in select expert. So really Sequence is only a unique record in my first table.
I have tried Group By Record Number, Component and Sequence for Table one. I have also tried Grouping by Sequence for Both Tables. I have tried adding a sum formula and even tried a running total without success.
Is this something that is possible? Is there something I may have missed trying?
Edit:
What I am current getting
Seq T1 Data T2 Data
10 A1 35
20 C2 25
20 C2 15
30 D5 30
40 D6 10
40 D6 50
What I am looking for
Seq T1 Data T2 Data
10 A1 35
20 C2 40
30 D5 30
40 D6 60
I finally figured it out. I grouped by Table 1 Sequence, then Table 2 Sequence (not sure if grouping by both is necessary). Then I used a Running Total Field in Group Footer right after the details section (Group for Table 2) and set the Reset value to On change of group 1 (Table 1).

Crystal Reports: How to pass parameter values between subreports?

I've been working on a report that makes use of three subreports (A,B and C). The idea here is to locate the subreports side by side, where each one has its own list, but also this:
-A is located on the left (with columns c1, c2 and c3 where c1 is like customerID)
-B is located right after A and has columns (c1, c4 and c6) which should present data corresponding to the records of A according to the same value of c1 (customerID)
-C is located right after B, has the columns (c1, c7 and c8) and the same applies to it as in B.
I want it to look like one single table where c1 should only be visible once.
I also know there is the linking option but it doesn't seem to be working. If that's what you're gonna say, how can I configure the links? If not, how can I do this?
And no, there is no way this could be done in one single report.
To the extent I understand you want to pass the c1 value across 3 subreports. In this case link the subreports to main reports and pass the c1 value to the report selection formula of the sub reports so that all reports retrive only c1 value
Now in sub reports B and C .. don't keep C1 column just keep c1 column in sub report A.
But let me know any specific reason to use sub reports instead you can place coulms from c1 to 17 side by side in a main report

Hold column group together in crosstab

I created a report in iReport with a crosstab containing 2 ColumnGroups.
If the crosstab contains more columns than fitting on the page, they are (correctly) continued on the next page. But how can I prevent JR from splitting inside a column group (so if the next column group doesn´t fit on the page, start it on the next page).
Example of colGroups i my crosstab:
Category 1 Category 2 Category 3
C1 C2 C3 C1 C2 C3 C1
Category 3
C2 C3
hope this will useful; inside jasper report on crosstab option there's a checkbox called "keeptogether"; this chekbox keep table on the same page without splitting it

iReport presenting data horizontally back

Using iReports, is there a way to display the data where it's going back and forth and pulling the data from one SQL statement?
Where an SQL query returned the following records
a0
a1
a2
a3
a4
a5
The report would be filled as follows ...
a0 a1
a2 a3
a4 a5
Normally I wouldn't have a problem doing a table, but I have to replicate someone's "application."
Yes, iReports allows you to fill your report so that the data is presented horizontally as you require in your question.
You can also specify how many columns you present in your report.
In the Report Inspector, right click on the report and select
Properties
In the Properties Dialog,
Click on the number beside Columns, enter 2.
Click on Print Order, select Horizontal
Click on Close
Press CTRL ALT PgDn to preview your report