- 
                Notifications
    You must be signed in to change notification settings 
- Fork 22
Feat/service task #745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Feat/service task #745
Changes from all commits
      Commits
    
    
            Show all changes
          
          
            73 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      0ddcb61
              
                Add support for service tasks, and add new service tasks for pdf gen…
              
              
                bjorntore b1bcc4d
              
                Remove default implementation of hook methods in standard service tasks.
              
              
                bjorntore 3ad4174
              
                Skip validation if service task.
              
              
                bjorntore 2e79565
              
                Always move to next for service tasks for now. Remoe service task res…
              
              
                bjorntore 21f71e8
              
                Return element type on current task and process tasks to the client.
              
              
                bjorntore fcc13bf
              
                Some process engine method renaming.
              
              
                bjorntore 35097ee
              
                Move current process state validation in process next into it's own m…
              
              
                bjorntore 4602c0a
              
                Move "move next" check below result check.
              
              
                bjorntore 2cd3e82
              
                Update PublicApi_ShouldNotChange_Unintentionally.verified.txt
              
              
                bjorntore 9fef45a
              
                IServiceTask: Rename from params to context. Remove detailed error fi…
              
              
                bjorntore 1632b82
              
                Remove ElementType again, as frontend didn't end up using it.
              
              
                bjorntore 6dba954
              
                Revert adding Common namespace within ProcessTasks namespace.
              
              
                bjorntore b8fa40e
              
                Revert NextElement to ProcessNext rename in ProcessController.
              
              
                bjorntore 3b33b4a
              
                IProcessEngine: Revert the rename from Next to ProcessNext back to re…
              
              
                bjorntore c132415
              
                Add remark about saving of data when execute returns successful result.
              
              
                bjorntore 75eab85
              
                Log service task failures as error.
              
              
                bjorntore d375ce4
              
                Add test for error message when process is ended.
              
              
                bjorntore 8e058b5
              
                Return bpmn element type to frontend.
              
              
                bjorntore 010385d
              
                Remove useless variables.
              
              
                bjorntore 0124a54
              
                Merge branch 'main' into feat/pdf-service-task
              
              
                bjorntore dbdb128
              
                Merge branch 'main' into feat/pdf-service-task
              
              
                bjorntore 3efdf3e
              
                Merge branch 'main' into feat/pdf-service-task
              
              
                bjorntore 81aa1c3
              
                Add default body for new method on IPdfService to avoid breaking change.
              
              
                bjorntore 064c17c
              
                Sanitize a log.
              
              
                bjorntore ae04d4c
              
                Nitpick: Use PascalCase for named placeholders.
              
              
                bjorntore 8fa3a92
              
                Prevent NRE in ProcessReader when no service tasks exists.
              
              
                bjorntore dd37c8a
              
                Add usings in PdfService to dispose streams when done.
              
              
                bjorntore 1da33f0
              
                Hmm
              
              
                bjorntore 74bcaa7
              
                Hmm 2
              
              
                bjorntore 8e21b26
              
                Add support for custom pdf data type.
              
              
                bjorntore f7f6191
              
                Try catch in standard service tasks.
              
              
                bjorntore e0139d3
              
                Ensure no empty strings in AltinnPdfConfiguration.
              
              
                bjorntore 6559707
              
                Make our service tasks internal sealed.
              
              
                bjorntore 45432b1
              
                Revert "Try catch in standard service tasks."
              
              
                bjorntore 1962825
              
                Use serviceTaskResult helper methods.
              
              
                bjorntore defee86
              
                Make pdf config sealed.
              
              
                bjorntore debeef0
              
                Add ability to stop EFormidlingServiceTask from sending eFormidling s…
              
              
                bjorntore a80248f
              
                Refactor configuration of eFormidling to enable setting up everything…
              
              
                bjorntore 80c6b82
              
                Summary doc improvement.
              
              
                bjorntore be2d6ab
              
                Fix receiver config.
              
              
                bjorntore 168e184
              
                Avoid breaking change in IEFormidlingReceivers.
              
              
                bjorntore c37baab
              
                nullcheck
              
              
                bjorntore 9376556
              
                Don't have common eformidling config provider anyways. Just have a he…
              
              
                bjorntore dab8d2d
              
                Remove usage of FluentAssertions.
              
              
                bjorntore 2cd9848
              
                assert receiver
              
              
                bjorntore 8d7ece0
              
                Add test for exception when legacy eformidling config is null.
              
              
                bjorntore 76b634e
              
                Fix legacy config provider name and try to make AltinnEFormidlingconf…
              
              
                bjorntore 5cad79d
              
                add unit tests for AltinnEFormidlingConfigurationTests validate
              
              
                bjorntore 7b0a284
              
                Change "Enabled" to "Disabled" for eFormidling. Active choice to disa…
              
              
                bjorntore 8102c43
              
                nitpick
              
              
                bjorntore 3d73516
              
                Merge branch 'main' into feat/pdf-service-task
              
              
                bjorntore 4769da7
              
                Merge branch 'main' into feat/pdf-service-task
              
              
                bjorntore 60c709d
              
                Tweak token names in DefaultEformidlingService.
              
              
                bjorntore e3a2dc7
              
                Add support for passing a list of task ids to the pdf component for a…
              
              
                bjorntore e6cc72c
              
                Add public api verified changes after adding auto pdf.
              
              
                bjorntore 0982b6a
              
                Merge branch 'main' into feat/pdf-service-task
              
              
                bjorntore 7a13da8
              
                Remove data type config for pdf.
              
              
                bjorntore 73b8d83
              
                Sanitize more logs to satisfy sonar.
              
              
                bjorntore 1c7a32c
              
                Merge branch 'main' into feat/pdf-service-task
              
              
                bjorntore 88032fb
              
                Remove trailing semicolon.
              
              
                bjorntore 2315a72
              
                Fix typo.
              
              
                bjorntore f5e7499
              
                Remove trailing semicolon.
              
              
                bjorntore dd2d8ea
              
                Fix typo.
              
              
                bjorntore 4b41c50
              
                Null guard.
              
              
                bjorntore 1782006
              
                Move process next do while inside process engine.
              
              
                bjorntore 98bae5e
              
                Merge branch 'main' into feat/pdf-service-task
              
              
                bjorntore 9b652c2
              
                Merge branch 'main' into feat/pdf-service-task
              
              
                bjorntore cb9b661
              
                Merge branch 'main' into feat/pdf-service-task
              
              
                bjorntore 318b9a9
              
                Merge branch 'main' into feat/pdf-service-task
              
              
                bjorntore 5d30397
              
                Merge branch 'main' into feat/pdf-service-task
              
              
                bjorntore 33ce78c
              
                Merge branch 'main' into feat/pdf-service-task
              
              
                bjorntore fa043be
              
                Unit test custom pdf file name.
              
              
                bjorntore 431ac68
              
                ProcessEngine and related tweaks from feature/fiks-io-client branch (…
              
              
                danielskovli File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
          Some comments aren't visible on the classic Files Changed page.
        
There are no files selected for viewing
Large diffs are not rendered by default.
      
      Oops, something went wrong.
      
    
  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
        
          
          
            54 changes: 54 additions & 0 deletions
          
          54 
        
  src/Altinn.App.Core/EFormidling/Implementation/EFormidlingLegacyConfigurationProvider.cs
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| using Altinn.App.Core.Internal.App; | ||
| using Altinn.App.Core.Internal.Process.Elements.AltinnExtensionProperties; | ||
| using Altinn.App.Core.Internal.Process.ProcessTasks.ServiceTasks.Legacy; | ||
| using Altinn.App.Core.Models; | ||
| using Altinn.Platform.Storage.Interface.Models; | ||
|  | ||
| namespace Altinn.App.Core.EFormidling.Implementation; | ||
|  | ||
| /// <summary> | ||
| /// A small wrapper around loading legacy eFormidling configuration from ApplicationMetadata, to be able to use the same configuration as the new eFormidling service task. | ||
| /// </summary> | ||
| /// <remarks>Should be deleted when <see cref="EformidlingServiceTaskLegacy" /> is removed.</remarks> | ||
| public interface IEFormidlingLegacyConfigurationProvider | ||
| { | ||
| /// <summary> | ||
| /// Gets validated eFormidling configuration from ApplicationMetadata (legacy). | ||
| /// </summary> | ||
| /// <returns>Validated eFormidling configuration.</returns> | ||
| Task<ValidAltinnEFormidlingConfiguration> GetLegacyConfiguration(); | ||
| } | ||
|  | ||
| /// <inheritdoc /> | ||
| internal sealed class EFormidlingLegacyConfigurationProvider : IEFormidlingLegacyConfigurationProvider | ||
| { | ||
| private readonly IAppMetadata _appMetadata; | ||
|  | ||
| public EFormidlingLegacyConfigurationProvider(IAppMetadata appMetadata) | ||
| { | ||
| _appMetadata = appMetadata; | ||
| } | ||
|  | ||
| public async Task<ValidAltinnEFormidlingConfiguration> GetLegacyConfiguration() | ||
| { | ||
| ApplicationMetadata applicationMetadata = await _appMetadata.GetApplicationMetadata(); | ||
| EFormidlingContract? eFormidling = applicationMetadata.EFormidling; | ||
|  | ||
| if (eFormidling is null) | ||
| { | ||
| throw new ApplicationConfigException($"No legacy eFormidling configuration found in application metadata."); | ||
| } | ||
|  | ||
| return new ValidAltinnEFormidlingConfiguration( | ||
| true, // Enabled prop is not used in legacy mode, as whether eFormidling is enabled or not is determined in the legacy service task. | ||
| eFormidling.Receiver, | ||
| eFormidling.Process, | ||
| eFormidling.Standard, | ||
| eFormidling.TypeVersion, | ||
| eFormidling.Type, | ||
| eFormidling.SecurityLevel, | ||
| eFormidling.DPFShipmentType, | ||
| eFormidling.DataTypes?.ToList() ?? [] | ||
| ); | ||
| } | ||
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.