Is it legal for 1 color-attachment to map to 2 different input-attachments from 2 different passes? - vulkan

Is this RenderPass setup legal in Vulkan?
That shows a frame setup of 4 subpasses, back to back. Subpass0 (C) outputs to 2 color-attachments. Its second output C.out1 maps to 2 input attachments: T0.in1 and T1.in1
Is it legal for 1 color-attachment to map to 2 input-attachments from 2 different subpasses?

maps to 2 input attachments: T0.in1 and T1.in1
Subpasses do not own attachments; the render pass owns attachments. Subpasses use attachments. The two subpasses are just using the same attachment as input attachments.
It's no different from two drawing commands using the same texture.

Related

Is there a way to distinguish sub process activities in lanes on BPMN using camunda modeler?

I have a dummy camunda model I'm attaching as an image. The model has a multi instance expanded sub process, in which I have two activities shown in different lanes.
Current Model
In the resulting .bpmn text I want it to show these activities as part of a lane, and not just as part of a sub process.
Is there any way to make the program display it like that in the file text?
The current resulting .bpmn file displays this:
<bpmn:laneSet id="LaneSet_1ibo785">
<bpmn:lane id="Lane_02zfiqn" name="house">
<bpmn:flowNodeRef>StartEvent_1</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Event_0cstzw3</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Activity_0expz37</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Activity_18mav3y</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Multi_Process1</bpmn:flowNodeRef>
</bpmn:lane>
<bpmn:lane id="Lane_08xtoyw" name="invitee" />
</bpmn:laneSet>
As you can see the lane "invitee" has no activity included even though it graphicaly shows one activity as part of it.

How to customize the dashboard chart and test steps in Extent Report 5

In my automation project (Selenium / Java), I am using Extent report version 5 and I have customized it to some extent.
The extent report is binded to ITestListener. After initializing and creating test - I have created 3 different nodes -
One for showcasing test input data, one for output data and another for showing test case meta data info.
The project consists of 3 test cases and 3 different nodes -
Two issues I observed and want to rectify is:
I am seeing the "pass" label for every node. Since I have 3 nodes created, it shows "pass" 3 times for each test case.
On the Dashboard, the passed steps shows 9 (due to the 3 nodes showing "pass" on each TC).
In fact, it should be 3? (or) may be some other meaningful count which indicates number of steps passed in total from all 3 TCs?

Generate template for a PDF form programmatically

Some retail company has 3 different business units, each of those uses 3 types of price tags:
small tags (6 columns per A4),
medium tags (3 columns per A4),
large (1 column per A4).
Early implementors of the system have created 9 different templates of price tag PDF form for this. So, any change of preferences regarding the outer appearance of price tags will result in modifications of 9 templates, which doesn't look like a good practice.
What I had in mind is to write a function module Z_COMPOSE_XML that takes in 2 parameters (business unit, size of price tag) and compose XML-schema for the template and data of PDF form, so that I will have only 1 form template instead of 9. How can I achieve this?
Just to be very clear regarding what I want to do:
I want to have a single PDF form, ZSINGLE_FORM
Program for printing price tags out calls FM Z_COMPOSE_XML passing two parameters (business-unit, size of price tag)
So, the output of the form will be dynamic:
if user passes "X" business-unit and SMALL size of price tag, FM Z_COMPOSE_XML will generate PDF form with 6 columns per A4 with the label "X" for each column
if user passes "Y" business-unit and MEDIUM size of price-tag, FM Z_COMPOSE_XML should generate PDF form with 3 columns per A4 with the label 'Y' for each column.

Artillery json output differing

I am using artillery and I am exporting the results as a json file with -o result.json
The problem is that it seems that the json files structure are not consistent depending on the arrivalRate.
When arrivalRate=5, the latencies branch for the intermediate reslts contains 4 fields (see image below).
When I set arrivalRate to a higher value, for example, arrivalRate=20 the json response just includes the latency without the other 3 fields. (see image below).
I would like to get all the information as in the first image.

ColdFusion/CFWheels Merge Multiple PDFs in different Controllers

I'm using Coldfusion 10 and CFWheels for my site.
Basically my site has a bunch of different types of forms with their own Controllers and views. For each form, the user has the option to dynamically generate a PDF of the form and download it. It basically loads the controller data but when it hits the view with a parameter of "pdf" it does the following which will generate the PDF and open the document in the browser:
<cfdocument format="PDF" saveAsName="#formtype#_#id#.pdf">
#includePartial("/printView")#
</cfdocument>
Each of these PDFs can have multiple pages depending on how many line items are added. Like I said in the beginning there are multiple types of forms so they will have their own controller and views and PDF generation with their print views. These forms are all customized and associated together with an ID like shipmentID. So I can have one shipment that contains 2 forms of type A and 1 form of type B and 3 of type C, etc. What I need to do is generate 1 PDF with all the forms merged together based on the shipment. So taking my example, the merged PDF for the shipment would contain the 2 forms of type A, 1 form of type B, and 3 of type C all merged.
Currently what I'm doing is making a http "GET" call to each of the dynamically generated PDF pages, save that to a temp directory, then merging them at the end.
I load the shipment and for each different type of form I do the following where urlPath is the path to the view that generates the dynamic PDF:
var httpService = new http();
httpService.setMethod("GET");
httpService.setUrl(urlPath);
invoice = httpService.send().getPrefix().filecontent.toByteArray();
var fullPath = "#filePath##arguments.type#_#id#.pdf";
//write files in temp directory
FileWrite(fullPath, invoice);
After I get the PDF and write it to a file, I save the path in an array for reference so I can loop through and merge all the referenced files in the array, then delete the temp directory where the files were saved.
The reason why I'm doing it this way is because the controllers and views are already set and generate the individual PDFs on the fly as it is.
If I try to load (all associated forms) and put everything in one file, I'll have to add all the same controller logic to load each form specific stuff and the associated views but these already exist for the individual page view.
Is there a better way to do this?
It works fine if there are only a few PDFs but if there a lot of different forms in the shipment like 20, then it's very slow and since we don't have CF Enterprise, I believe the cfdocument is single threaded. The forms have to be generated dynamically so they contain the most current data.
UPDATE for Chris
I've added some code to show what the various forms might look like. I validate and load a bunch of other things but I stripped it down to get the general idea:
controllers/Invoices.cfc
The path might be something like: /shipments/[shipmentkey]/invoices/[key]
public void function show(){
// load shipment to display header details on form
shipment = model("Shipment").findOne(where="id = #params.shipmentkey#");
// load invoice details to display on form
invoice = model("Invoice").findOne(where="id = #params.key#");
// load associated invoice line items to display on form
invoiceLines = model("InvoiceLine").findAll(where="invoiceId = #params.key#");
// load associated containers to display on form
containers = model("Container").findAll(where="invoiceid = #params.key#");
// load associated snumbers to display on form
scnumbers = model("Scnumber").findAll(where="invoiceid = #params.key#");
}
controllers/Permits.cfc
The path might be something like: /shipments/[shipmentkey]/permits/[key]
public void function show(){
// load shipment to display header details on form
shipment = model("Shipment").findOne(where="id = #params.shipmentkey#");
// load permit details to display on form
permit = model("Permit").findOne(where="id = #params.key#");
// load associated permit line items to display on form
permitLines = model("PermitLine").findAll(where="permitId = #params.key#");
}
controllers/Nafta.cfc
The path might be something like: /shipments/[shipmentkey]/naftas/[key]
public void function show(){
// load shipment to display header details on form
shipment = model("Shipment").findOne(where="id = #params.shipmentkey#");
// load NAFTA details to display on form
nafta = model("NAFTA").findOne(where="id = #params.key#");
// load associated NAFTA line items to display on form
naftaLines = model("NaftaLine").findAll(where="naftaId = #params.key#");
}
Currently my view is based on a URL parameter called "view" where the values can be either "print" or "pdf".
print - displays the print view that's pretty much a stripped down version of the form without the webpage headers/footers etc.
pdf - calls the cfdocument code I pasted at the top of the question which uses the printView to generate the PDF.
I don't think I need to post the "show.cfm" code as it would just be a bunch of divs and tables displaying the specific information for each particular form in question.
Keep in mind that these are only 3 example form types and there are 10+ types that may be associated to 1 shipment and the PDF's would need to be merged. Each type may repeat several times within a shipment as well. For example a shipment may contain 10 different invoices with 5 permits and 3 NAFTAs.
To make things slightly more complicated, a shipment can have 2 types: US Bound or Canada Bound and based on this different form types can be associated to the shipment. So an Invoice for Canada will have totally different fields than an invoice for US so the models/tables are different.
Currently to do the merging I have a controller that does something like the following (note that I stripped a lot of validation, loading of other objects to simplify)
public any function displayAllShipmentPdf(shipmentId){
// variable to hold the list of full paths of individual form PDFs
formList = "";
shipment = model("shipment").findOne(where="id = #arguments.shipmentId#");
// path to temporarily store individual form PDFs for later merging
filePath = "#getTempDirectory()##shipment.clientId#/";
if(shipment.bound eq 'CA'){
// load all invoices associated to shipment
invoices = model("Invoice").findAll(where="shipmentId = #shipment.id#");
// go through all associated invoices
for(invoice in invoices){
httpService = new http();
httpService.setMethod("get");
// the following URL loads the invoice details in the Invoice controller and since I'm passing in "view=pdf" the view will display the PDF inline in the browser.
httpService.setUrl("http://mysite/shipments/#shipment.id#/invoices/#invoice.id#?view=pdf");
invoicePdf = httpService.send().getPrefix().fileContent.toByteArray();
fullPath = "#filePath#invoice_#invoice.id#.pdf";
// write the file so we can merge later
FileWrite(fullPath, invoicePdf);
// append the fullPath to the formList as reference for later merging
formList = ListAppend(formList, fullPath);
}
// the above code would be similarly repeated for every other form type (ex. Permits, NAFTA, etc.). So it would call the path with the "view=pdf" which will load the specific form Controller and display the PDF inline which we capture and create a temporary PDF file and add the path to the formList for later merging. You can see how this can be a long process as you have several types of forms associated to a shipment and there can be numerous forms of each type in the shipment and I don't want to have to repeat each form Controller data loading logic.
}else if(shipment.bound eq 'US'){
// does similar stuff to the CA except with different forms
}
// merge the PDFs in the formList
pdfService = new pdf();
// formList contains all the paths to the different form PDFs to be merged
pdfService.setSource(formList);
pdfService.merge(destination="#filePath#shipment_#shipment.id#.pdf");
// read the merged PDF
readPdfService = new pdf();
mergedPdf = readPdfService.read(source="#filePath#shipment_#shipment.id#.pdf");
// delete the temporarily created PDF files and directory
DirectoryDelete(filePath, "true");
// convert to binary to display inline in browser
shipmentPdf = toBinary(mergedPdf);
// set the response to display the merged PDF
response = getPageContext().getFusionContext().getResponse();
response.setContentType('application/pdf');
response.setHeader("Content-Disposition","filename=shipment_#shipment.id#_#dateFormat(now(),'yyyymmdd')#T#timeFormat(now(),'hhmmss')#.pdf");
response.getOutputStream().writeThrough(shipmentPdf);
}
See: https://forums.adobe.com/thread/1121909 ... "...Standard Edition Adobe throttles the PDF functions to a single thread,...Developer runs like Enterprise" so your development environment will whip out the pdfs but your CF Standard production server will be choking.
Also, seems you are not having trouble with one or two pdfs. I have CF Enterprise and it was generating pdfs just fine - a few seconds - and then out of nowhere pdfs started taking 4 minutes. Another comment in the above referenced adobe post suggested check in the /etc/hosts that CF is contacting itself (?????). Well some digging and I found that the Windows\system32\drivers\etc\hosts had been updated a day before users discovered pdfs were timing out. The IP had been changed to some other intranet IP and the server name was the DNS server name. I changed the value back to 127.0.0.1 localhost and voila, pdfs started rendering in normal amounts of time.