.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Beginner question: Passing the output of one Activity to the Input of another

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :Windows Application
 

Hi, I am brand new to WF so forgive what might be a simple question.

I am creating multiple activities which will execute in a sequence and pass data down the chain.  I know that one way to do this is to set a context variable in the parent Sequence from Activity A, and then read this value in Activity B (thus the output of A is effectively the input of B).

I'm fine using this technique, but if there is a way to directly declare that the input of Activity B should be the output of Activity A, I'd prefer this.  I'm intrigued by this comment in the new Activity template:

        // If your activity returns a value, derive from CodeActivity<TResult>
        // and return the value from the Execute method.

What is the point of returning a value from an Activity?  Can this return value be read somehow by the next Activity in the sequence?  I'd like to set the input of Activity B to the return value (output) of Activity A.  How would I do this?

Thanks,

Mike Vargas




View Complete Post


More Related Resource Links

Exposing data contract without passing as input or output parameter for any operation contract

  

I have a method in  wcf which returns stream of custom object. I need to deserialize this stream at client side, but my custom class which is exposed as data contract is not visible through client proxy. When I add a dummy operation contract which returns the custome object I am able to get this custom class. I dont want to write this dummy method as there are many such custom classes.

Is there any way to expose data contract without writing any operation contract that returns or accepts data contract type object?

Example:

[

 

ServiceContract]

Exposing data contract without passing as input or output parameter for any operation contract

  

I have a method in  wcf which returns stream of custom object. I need to deserialize this stream at client side, but my custom class which is exposed as data contract is not visible through client proxy. When I add a dummy operation contract which returns the custome object I am able to get this custom class. I dont want to write this dummy method as there are many such custom classes.

Is there any way to expose data contract without writing any operation contract that returns or accepts data contract type object?


output cache to be used only when parameter has changed + old question of user control not answered

  

hello,

i have 2 questions about output cache:

1.is it just me , or does it seems that it is used only after the second time that the user reaches the webpage? if so, why, and how can i tweak it to my needs? my guess is that it wouldn't be logical to cache every time a user reach a webpage, but only when it happens enough times.

2.i know that i can use "varybyparam" for using the output cache when the parameter doesn't change , but it seems that it would use the output cache even if there is no parameter , or if the specified paramter is not there. is there a way to overcome this?

3.an old question that somehow marked as "answered" , yet i didn't solve : suppose i created a user control and i gave it values through the CTOR via the aspx file . is it possible to show the values from within the split/design mode? remember that i've talking about ASP.NET and not simply C# winforms . i write this because this question was on :

http://forums.asp.net/t/1588671.aspx

and the answer that i got was for C# and winforms . i've tried to do the same for ASP.NET , but i've failed.

can anyone please help me?


Can you have a different input and output model in a view?

  
So here is what I would like to do. Lets say I have a view that can do multiple things, and thus talk to several different controllers. For example, it might create a new group, or change the name of an existing group, or add a user to some group. Now, for the view to display correctly, it would only need the username, a list of groups, and possibly a list of users. Yet for the controllers to work they would need a different set of information, the userid to be added to a group, the name of a new group, or the name and id of a group to edit.With this setup, there would be a potential of several different models for both input to the view, and output to the different controllers. I like the idea of using the helpers Html.Textboxfor() ect. to create the different submission elements, but I don't so much like the idea of having one giant model (Even if it just a model that inherits or has several sub models) that gets passed around everywhere for this view. It seems... clunky.Perhaps there is a better way to do this (if so, feel free to smacking me around with a few "Your and idiot"s) but is there any way to have a separate input and output model for a view?

I need a workflow triggered by a workflow...how do I design this? Beginner question

  
I've added the Approval workflow to a forms library and it generates the necessary tasks and emails for 2 levels (serial) of Approval on the form. When the form has been approved the 2nd time, I want it to trigger another workflow that notifies a 3rd person of the existence of the form and assigns her a separate non-approval task. I'm creating it in SharePoint Designer, and I can do most of it, but I'm not sure what field I'm looking for, at the beginning in order to start the workflow. Currently, there is no column for Approval Status in the form library, only a column that shows the status of the workflow (In Progress or Approved).  I tried If Workflow Status equals Approved then email.... but that didn't work. Any help is greatly appreciated.  I'm looking for the data source field and the list item field and value, I guess.  

Form input to output as a link on the display page (need help please)

  
 I have a form, the form works great and displays the information perfectly on a designated display page I have set up from its database.  One problem, I want to display it as a link to the site instead of how it is now, just plain text. Thus the user would put in the text box the site and hit submit and the site would appear of the display page.  Can anyone please assist me on this, and where to drop the hyperlink control? in the form page? or in the display page?    Below is my form code page:     <p><strong><font face="Verdana, Arial, Helvetica, sans-serif">International Access Entry      Form</font></strong></p><p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Please enter information      international contact information below. This if for authorized staff only.</font></p><table width="548" border="0" cellpadding="0" cellspacing="10" bgcolor="f0f0f0">  <tr>    <td width="528"><form name="INTL_Form" method="post" action="INTL-results.asp">      <p><font face="Verdana, Arial, Helvetica, sans-serif"> </f

Making a program take both standard input and output from/to another program

  
I have an off-the-shelf program A.exe which reads from standard input and writes to standard output. How do I write a program B.exe that reads from program A and then respond to program A by writing to the standard input (of program A)? Piping (|) seems to be one way only. Thanks.

Passing a reference of the workflow to an activity

  
It there a way to pass in a reference of a workflow into an activity that the workflow is running (as an inargument)  in the Workflow designer?

Beginner question about eliminating Dups

  
I looked at a couple of links about eliminating dups. One  link suggested RowNUmber() function which is fine for 2005 (but I wanted something that would also work on 2000).  Another link was a MS article advising to select the dups into a temporary table. http://support.microsoft.com/kb/139444/en-us I found this article confusing, and I don't see why it suggests we need a holding table. So I propose this approach - is there any reason NOT to do it my way? (Is there a bug here I'm overlooking?) IF EXISTS(SELECT 1 FROM sys.tables WHERE NAME = 'Facilities' ) DROP Table dbo.Facilities; CREATE TABLE [dbo].[Facilities] ( [ID] int IDENTITY, [FacNo] varChar(3) , [theState] varchar(2) ) INSERT INTO Facilities ([FacNo], theState)VALUES ('1', 'FL') INSERT INTO Facilities ([FacNo], theState)VALUES ('7', 'FL') INSERT INTO Facilities ([FacNo], theState)VALUES ('25', 'FL') --- DUPLICATE THE FIRST THREE ROWS INSERT INTO Facilities ([FacNo], theState)VALUES ('1', 'FL') INSERT INTO Facilities ([FacNo], theState)VALUES ('7', 'FL') INSERT INTO Facilities ([FacNo], theState)VALUES ('25', 'FL') -- ADD some new rows. INSERT INTO Facilities ([FacNo], theState)VALUES ('4', 'VA' ) INSERT INTO Facilities ([FacNo], theState)VALUES ('5', 'VA' ) INSERT INTO Facilities ([FacNo], theState)VALUES ('10','Va') INSERT INTO

Script Component - Change One Row Input to Multiple Row Output

  
Hi All I am new to SSIS, and looking for help. I do not know if it is possible, but I like to try using the "Script Component" to change a input like this:   1234 1235 1236 ...   to and output like this:   1234, Value1 1235, Value2 1235, Value3 1235, Value4 1236, Value5 ...   Depending of the input value, 1 or more Rows are pushed out the Output, Like the value 1234 -> result in 1 Row in the output, where the value 1235 -> result in 3 rows in the output. Is this possible to do in a Script Component?? If it is how do you program such behavior? Do some good sources to learn SSIS exist out there?? I think it is not easy to find information. Peter Schwennesen

System.ArgumentException : The input workflow type must be an Activity.

  

Hi everyone! I’m getting this error when starting up the workflow:

System.ArgumentException : The input workflow type must be an Activity.
Parameter name: workflowType

The code I’m using is shown below:


using (var wf = new WorkflowRuntime())
{
  wf.WorkflowCompleted += (_, __) => signal.Set();
  wf.WorkflowTerminated += (_, __) => signal.Set();
  var args = new Dictionary<stringobject>();
  args.Add("Input", plainText);
  args.Add("Output"string.Empty);
  var inst = wf.CreateWorkflow(typeof (HtmlTypography), args

passing XMLDocument object as input to WCF service

  

hi,

i have to write a WCF service which accepts XMLDocument object as input.

In my contract, I have defined a function like this:

bool validate(XmlDocument doc);

In my service, the function is implemented llke this:

public bool validate(XMLDocument doc)

{

code to validate the doc against an XSD file

From my test project i am passing an XML document.

But it says service cannot be found.

Instead if i define XMLDocument doc inside function like this:

public bool validate()

{

XMLDocument doc= path of document

code to validate the doc against an XSD file

and contract like this:

bool validate();

it works fine.

It validates the XML against an XSD and returns true or false.

Please help.


Custom PipelineComponent getting input but gives no output

  

Using the component results in a "SSIS.Pipeline: "component "Save" (292)" wrote 0 rows." but the input is 2903 rows.

While debugging it the buffer.NextRow() is called 2903 times and no exception is thrown. Am I missing something?

 

[DtsPipelineComponent(DisplayName = "Add Id", Description = "Add a new guid named Id.", ComponentType = ComponentType.Transform)]
  public sealed class AddId : PipelineComponent
  {
    private int bufferColumnIndex;

    public override void ProvideComponentProperties()
    {
      base.ProvideComponentProperties();

      //ComponentMetaData.UsesDispositions = true;

      var myInput = ComponentMetaData.InputCollection.New();
      myInput.Name = "Input";
      myInput.ErrorRowDisposition = DTSRowDisposition.RD_FailComponent;

      

Passing parameters of type List<> from a web application to the Receive activity of a workflow servi

  

Hello,

I have a Recieve activity with the following parameters in the Content property.  Using generic parameter names here:

- parameter1 of type Object1 assigned to Parameter1 variable

- parameter2 of type List<Object2> assigned to Parameter2 variable.  Note - default value of Parameter2 variable = New List(Of Object2)()

- parameter3 of type Object3 assigned to Parameter3 variable

In my web application, I create a service reference and create a client as such:

 

SomeWFServiceClient client = null
;

try

{
 client = new
 SomeWFServiceClient();
 List<Object2> listOfObject2 = new
 List<Object2> { new
 Object2 {Id=1, Name="SomeName"
, Type="Customer"
 }, };

client.ProcessSomething(Object1, listOfObject2, Object3);
}
catch

{
}
finally

{
 client.Close();
}
I have a breakpoint at the Receive activity.  When I look at the values that get assigned to the Receive activity parameters, I see that parameter1 and parameter3 ge

Beginner question: get selected value of Html.DropDownList

  

Hi everyone, how are you doing!

I'm just started learning MVC 2. I went through the music store example (though I don't 100% get everything). Now I want to add some functions to the page to learn more. I added paging, and now I want to add search combo boxes (drop down lists). Basically, in the album list screen, I want to add 1 drop down list of genre. If user select 1 genre then click Search, the page should show all album of that genre only.

My problem is I don't know how to get the selected value of this drop down list. The approach I am using now is to get the selected value, then put it as parameter and redirect to Index (/StoreManager/Index?searchGerneId=x). I searched through many posts but couldn't find a solution that works for me. It is probably because I don't really get MVC yet and still try to do things the code-behind way. So please help me :) My code  for Index in Controller is below

public ActionResult Index(int pageNumber = 1, int searchGenreId = -1)
        {
            var albums = from album in storeDB.Albums
                         join genre in storeDB.Genres on album.GenreId equals genre.GenreId
                         join artist in storeDB.Artists on album.ArtistId equals artist.ArtistId
                         orderby album.Title
                         select al

SSAS Beginner Question

  
As the title states, I am new to SSAS. My question is related to my cube design which I think is incorrect. I have 3 tables, Invoices, invoice details and journal postings. Invoices holds the invoice number, invoice details is related to invoices by invoice number and holds the amount billed. Journal is also related to invoices by invoice number and holds the post date. when I browse my cube I select invoices.invoice number as rows and amt billed as columns. unfortunately, it is showing my the full sum for every row regardless of invoice number. Any ideas?

Total beginner question...sorry

  

Just started programming with ASP.net about a week ago.....  I'm trying to figure out why this isn't working....

I'm trying to retireve an image URL from a database.  They are saved as strings in the table (i.e. 20.jpg, 21.jpg, etc.).  When I have the images saved in the root folder, I can access them just fine with the following ItemTemplate repeater line....

<img src="<%#Eval("piclink")%>" />

Obviously, I don't want to have a whole mash of JPEG files sitting in my root directory.  I suppose I could just use an absolute path, but how would I go about using a relative one?  I tried this...

<img src="</pictures/%#Eval("piclink")%>" />   

And this....   

<img src="<../pictures/%#Eval("piclink")%>" />

And still get nothing.


Thanks! 



Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend